gpt4 book ai didi

ios - ionic 无法加载网页,错误为 : The operation couldn’t be completed.(NSURLErrorDomain 错误 -999。)

转载 作者:行者123 更新时间:2023-12-03 20:50:56 26 4
gpt4 key购买 nike

当我有一个带有 AngularJS 的 ionic 应用程序并尝试在真实设备上使用它时,我得到以下输出:

    2015-07-06 17:00:15.760 MyApp[2195:832165] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/D7596A9C-B658-454C-8418-9A61B26091C2/Library/Cookies/Cookies.binarycookies
2015-07-06 17:00:15.803 MyApp[2195:832165] Apache Cordova native platform version 3.8.0 is starting.
2015-07-06 17:00:15.804 MyApp[2195:832165] Multi-tasking -> Device: YES, App: YES
2015-07-06 17:00:15.811 MyApp[2195:832165] Unlimited access to network resources
2015-07-06 17:00:16.460 MyApp[2195:832165] Resetting plugins due to page load.
2015-07-06 17:00:16.911 MyApp[2195:832165] Finished load of: file:///private/var/mobile/Containers/Bundle/Application/47769242-72D0-4907-810A-85332D9564AF/MyApp.app/www/index.html#/home
2015-07-06 17:00:24.247 MyApp[2195:832165] Resetting plugins due to page load.
2015-07-06 17:00:24.259 MyApp[2195:832165] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2015-07-06 17:04:08.907 MyApp[2195:832165] Resetting plugins due to page load.
2015-07-06 17:04:08.910 MyApp[2195:832165] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2015-07-06 17:06:19.397 MyApp[2195:832165] Received memory warning. // Here the the app crashes

index.html 看起来像:

  <body ng-app="myapp.module">
<ion-pane ng-controller="HomeCtrl" ng-init="check()">
<ion-header-bar class="bar-stable">
<h1 class="title">My ionic app</h1>
</ion-header-bar>
<ion-content class="home-content">
<div class="welcome-message"> Welcome, <span ng-if="!userInfo.isAuthenticated">{{guest}}</span> <span ng-if="userInfo.isAuthenticated">{{userInfo.profile.name}}</span> !</div>

<button type="button" class="button center-block button-positive" ng-show="userInfo.isAuthenticated" ng-click="logout()" name="button">{{logOutTextButton}}</button>
<button type="button" class="button center-block button-positive" ng-hide="userInfo.isAuthenticated" ng-click="login()" name="button">{{loginTextButton}}</button>

</ion-content>
<footer>Footer text</footer>
</ion-pane>

</body>

最佳答案

从错误代码“999”来看,您似乎在 UIWebView 完成加载第一个 url 之前正在加载或重新加载第二个 url...

因此,系统取消了第一个,并尝试加载您传递给它的第二个网址...

关于ios - ionic 无法加载网页,错误为 : The operation couldn’t be completed.(NSURLErrorDomain 错误 -999。),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31248446/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com