Skip to content

Commit 0b3f913

Browse files
committed
fix(ios<16): disable templayers
1 parent 417eac9 commit 0b3f913

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/js/utils/config-utils.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ async function loadConfigs() {
106106
}
107107
});
108108

109+
// Disable tempLayers on iOS < 16 (not working because of preflight OPTIONS request)
110+
const info = await Device.getInfo();
111+
if (info.platform === 'ios') {
112+
// info.osVersion is usually like "15.6.1" or "16.0"
113+
const version = parseFloat(info.osVersion);
114+
if (version < 16.0) {
115+
config.tempLayers = [];
116+
}
117+
}
109118
// Filter temp layers
110119
config.tempLayers = config.tempLayers.filter((layer) => {
111120
if (!layer.isProdReady && Capacitor.getPlatform() !== "web") {

0 commit comments

Comments
 (0)