6

I'm trying to develop an application using phonegap (1.1.0), xcode4 and jqtouch. The problem is that I can't open any external link. For example if I write an anchor tag with this href attribute:

href="http://www.google.com"

when running the app and clicking on the link i get this error:

ERROR whitelist rejection: url='http://www.google.com/'

As reading into different forum the application should at least open the link into safari but it doesn't happen.

Another example. If I insert an image tag that refers to an online source like this (in this I use tomcat to upload the data)

src="localhost:8080/myimage.jpeg"

it doesn't work too.

Is there any setting that I have to manage into xcode?

Any idea or advice would be very appreciate. Thanks.

user993172
  • 71
  • 1
  • 3
  • Thanks for this post. I'm also wondering the settings under PhoneGap.plist (Cordova.plist now) OpenAllWhiteListURLsInWebView. Sounds like it should open them in webview of phonegap instead of safari, though when I change the setting to YES or NO, it always opens in the application webview. Any idea? – C0D3 Apr 18 '12 at 20:17

2 Answers2

6

I had this issue yesterday as well. The newer version of PhoneGap requires you to add external urls to the whitelist.

I found the solution here: Link

0

Just write the link like this for phonegap 2.4.X

<a onClick='window.open("http://www.google.com/", "_system");' href='http://www.google.com' />