While I'm having an ionic app with AngularJS and trying to use it on a real device I get the following output:
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 looks like:
<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>
From the error code "999", it looks like you are loading or reloading a second url before the UIWebView finished loading the first url...
therefore, the system cancelled the first one and is trying to load the second url you passed to it...