Reputation: 602
I'm using phonegap to create an app. I'm having a problem when I'm trying to 'include' a remote url as webpage. I have this working on Android, this was faily easy by changing the super.loadUrl();
. After a while I found out that I could change the startPage
(for iOS). Now I can include the remote webpage in an iOS app but phonegap doesn't seem to be loading.
No events (like the deviceready
) will be called and I can't use the phonegap api.
Any help on this please?
Upvotes: 1
Views: 3534
Reputation: 5267
Where are you loading the PhoneGap.js file from? It won't fire the events if you are loading the JS file locally. The JS file will need to be loaded from the same page that you are loading remotely.
[EDIT] Just noticed that you said you are able to browse the same URL on Android. The PhoneGap.js file is different for Android and iOS. If you are using a common file, that could be the problem.
Upvotes: 0
Reputation: 23273
In order for you to be able to run PhoneGap code on an external website you will need to whitelist the website. Each platform has a different way of whitelisting. For iOS you will need to add the host in PhoneGap.plist under the "ExternalHosts" key.
Upvotes: 4