apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

App:// Scheme blocks all dynamic url loading patterns for cdn modules that use src="//whatever" #1114

Closed northkode closed 3 years ago

northkode commented 3 years ago

Bug Report

Problem

What is expected to happen?

dynamic urls should still be able to load with https, but because of the cordova ios scheme of app:// JS and css scripts cant load when they are using the dynamic src of src="//somedomain.com/jstoload.js"

What does actually happen?

the js tries to load from "app://somedomain.com/jstoload.js"

Information

Can we remove this some how or have the wkwebview detect these calls and change there host protocal?

Command or Code

Anything cordova ios 6.0.0+ because of the new app:// scheme

Environment, Platform, Device

IOS

Version information

All Versions

Checklist

jcesarmobile commented 3 years ago

this isn't a cordova issue, they shouldn't be using src="//whatever", it's a bad practise, pretty sure it doesn't work when loading from file:// neither. Also, there is nothing we can do, it's the webview itself what adds the scheme used to load the app when none is provided.