Joosep Hint
Joosep Hint

Reputation: 31

Phonegap: External links not opening in Safari on iOS 9

When trying to open external urls on iOS 9 with phonegap using
window.open("www.google.com", '_system') method it opens the link inside the app but it is supposed to open it in Safari.On iOS 8 the links were opened in Safari just fine.

Upvotes: 3

Views: 1340

Answers (3)

anmol agarwal
anmol agarwal

Reputation: 51

Following is what worked for me. 1. update cordova CLI

sudo npm upgate -g cordova
  1. update platforms

    cordova platform update ios

  2. Create a new project.

  3. replace the content of www folder and config.xml file with your older one.
  4. add ios platform and build.

Please note: you might get some issues on iOS9, for instance some conflicting code, which you might need to google and fix.

Hope this helps.

Upvotes: 2

Joosep Hint
Joosep Hint

Reputation: 31

It turned out that after updating PhoneGap, the plugins won't load anymore for iOS when building in OS X. When i built it in Windows (using older phonegap-ios 3.8.0, NOT 3.9+), it loaded the plugins properly. So the problem is not related to iOS 9, but is related to PhoneGap.

Upvotes: 0

johnborges
johnborges

Reputation: 2553

Can you verify that the InAppBrowser Plugin is installed?

cordova plugin list

You need that plugin to get window.open() to work properply.

Upvotes: 1

Related Questions