apache / cordova-ios

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

Cordova iOS How to inject local cordova.js to remote H5 calls. #1396

Closed stupidchou closed 3 months ago

stupidchou commented 3 months ago

What if a remote h5 wants to reference my local cordova.js to get my locally injected js event?

breautek commented 3 months ago

Accessing or using native platform APIs from remote code breaks Section 4.7.2 of Apple's App Store policy which reads:

4.7.2 Your app may not extend or expose native platform APIs to the software without prior permission from Apple.

Therefore supporting, or recommending the use of the cordova.js file remotely is not something that Apache can advise.

If you need to use native platform APIs, then the executable code must be bundled with your app.