File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import InseeCommWiki from "../../../config/com_wiki.json";
2020import GfiRulesProps from "../../../config/gfi-rules.json" ;
2121
2222import { Capacitor } from "@capacitor/core" ;
23+ import { Device } from "@capacitor/device" ;
2324
2425const config = {
2526 baseLayers : null ,
@@ -106,6 +107,15 @@ async function loadConfigs() {
106107 }
107108 } ) ;
108109
110+ // Disable tempLayers on iOS < 16 (not working because of preflight OPTIONS request)
111+ const info = await Device . getInfo ( ) ;
112+ if ( info . platform === 'ios' ) {
113+ // info.osVersion is usually like "15.6.1" or "16.0"
114+ const version = parseFloat ( info . osVersion ) ;
115+ if ( version < 16.0 ) {
116+ config . tempLayers = [ ] ;
117+ }
118+ }
109119 // Filter temp layers
110120 config . tempLayers = config . tempLayers . filter ( ( layer ) => {
111121 if ( ! layer . isProdReady && Capacitor . getPlatform ( ) !== "web" ) {
You can’t perform that action at this time.
0 commit comments