I have an Ionic app that I usually debug using Safari's javascript console attached to the iOS simulator. A few days ago, not sure exactly when, but I think it was around the time XCode pushed out their latest update, I started getting the following message in Safari's console output whenever I click a tab to change states:
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: []
This causes the app to lag, and sometimes crash. I reverted my code to earlier and earlier states with no resolution, so I tried creating an Ionic app from scratch:
ionic start throwaway
cd throwaway
ionic run ios
...and sure enough, the issue was still there. I'm trying everything to no avail. Here's the output of ionic info:
Your system information:
Cordova CLI: 5.2.0
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.4
Ionic App Lib Version: 0.3.8
ios-deploy version: Not installed
ios-sim version: 4.1.1
OS: Mac OS X Yosemite
Node Version: v0.12.2
Xcode version: Xcode 7.0 Build version 7A220
The problem does not occur on Android, just iOS.
Thanks for your help!!
Found the answer! Apparently iOS9 breaks everything. Luckily, Ionic's team saw this coming: http://blog.ionic.io/ios-9-potential-breaking-change/
Install the referenced Angular patch manually. You can also update to Angular 1.4.6 as it includes the patch, but I couldn't find an easy way to do this on Ionic as it comes bundled with Angular 1.4.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With