Error: Whitelist rejection in Phonegap

前端 未结 7 2198
太阳男子
太阳男子 2020-12-01 17:27

I\'m new to mobile development. I\'m using Phonegap/Cordova to create a cross-platform app. My code works well on Android but when I\'m porting it to iPhone it\'s showing an

相关标签:
7条回答
  • 2020-12-01 18:23

    You will have to Domain Whitelist so you can access outside domains such as http://google.com.

    In iOS (Cordova > 3.0.0), the whitelisting rules are found in AppName/config.xml and declared with the element <access origin="..." />

    You can also use wildcards to declare domains. For example, to allow access to all subdomains and TLDs (.com, .net, etc) of Google, use *.google.*

    Reference: Domain Whitelist Guide

    0 讨论(0)
提交回复
热议问题