[英]Ionic whitelist plugin blocks the iPhone but works in the browser
我有一个与后端通信的离子移动应用程序。 它运行一个简单的登录名,在Android(浏览器/电话)和mac(仅浏览器)中完美运行。 在iPhone上返回时运行失败:
MyAppName[931:60b] ERROR whitelist rejection:
url='https://login.myurlapi.com/apitest/validate.php'
我已经检查了白名单插件文档,并且应该将配置添加到我的config.xml
进行查找:
<access origin="myapiurl.com"/>
<allow-navigation href="https://*/*"/>
<allow-intent href="https://*/*"/>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<platform name="ios">
<access origin="myapiurl.com"/>
</platform>
更新 :我检查了日志,看起来甚至无法从以下位置获取默认离子样式级联表:
ERROR whitelist rejection:
url='http://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css'
这是用于解决iOS中的连接问题并使其在android中正常工作的配置,请参阅我如何在每个平台内使用config而不是使用全局参数:
<content src="index.html"/>
...
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="2000"/>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<platform name="ios">
<access origin="myapiurl.com"/>
<icon src="resources/ios/icon/icon.png" width="57" height="57"/>
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/>
...
</platform>
<platform name="android">
<access origin="myapiurl.com"/>
<allow-navigation href="https://*/*"/>
<allow-intent href="https://*/*"/>
<icon src="resources\android\icon\drawable-ldpi-icon.png" density="ldpi"/>
...
</platform>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.