0

I just used crosswalk in android for months. Now I want to use crosswalk on iOS and follow the guide on and i can run the demo. but i revise the content of index.html in www directory of sample code,add

<a href='www.xxx.com'>mywebsite</a>

in index.html,then run the echo project.i find i could not go to www.xxx.com in iOS 9+ simulator when i click the "mywebsite",an "a label" in index.html.my Xcode is 7.1 and my OS X is 10.11. I want to ask experts why I could not go to internet website by url using crosswalk for ios. I could visit internet website by URL in webpage when I use crosswalk on android.

Any light or reply would be appreciated.

Juri Noga
  • 4,363
  • 7
  • 38
  • 51
john
  • 1
  • 1
  • 1
    Try replacing www.xxx.com with the website you want. Perhaps xxx.com exists, but is not likely the one you want. – picciano Nov 03 '16 at 15:20
  • www.xxx.com is my code mask.the real website is www.baidu.com,you understands wrong.but also,thanks for your reply – john Nov 04 '16 at 01:50

2 Answers2

0

In the myApp-info.plist file (target->Info tab), you need to set the key App Transport Security Settings -> Allow Arbitrary Loads to true

App Transport Security Settings

Apple has now disabled access to non-https websites by default, so you need to explicitly allow them in your app.

Bek
  • 2,206
  • 20
  • 35
0

Right click on

info.plist open as Source Code and add this snppet

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>

clean (shift+cmnd+K) and Run the project.