Infinite digest loop in Ionic Apps after latest XCode update (iOS only) - angularjs

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.

Related

Error: $compile:tplrt: Cannot render page after compiling AngularJS with WebStorm on Windows

I am currently pretty lost where to start searching for the error that I am facing. The same AngularJS project that my colleagues have been working on for quite a while on Macs cannot be compiled correctly on my Windows machine. No idea if windows and mac has anything to do with the error but just in case I am adding this information.
I've checked out the project with SourceTree and opend it with WebStorm.
First npm install then gulp dev in the terminal of WebStorm and my angularJs-project is beeing compiled without any errors. When then the browser windows with //localhost is beeing opened, the page shows shortly the loading anymation and then stays blank.
In the attached screenshot you can see the output of the console. Any ideas?
AngularJS Version: 1.7.2
NPM Version: 5.6.0
Gulp:
CLI version 3.9.1
Local version 3.9.1
What could make the difference that the project is running perfectly on other machines but not on mine?
[Edit]:
I have now reanimated my old macbook, checked out the exact same project with source tree, installed webstorm, ran npm install, then doing this to set up gulp and then running gulp dev: The App runs just fine.
On my Windows Laptop I've started all over, deinstalled WebStorm, deinstalled node.js and did the whole set up as described above. Only difference that I need to install node.js manually on Windows to use npm.... same error as described before.

JS Error for Angular and Nativescript project

Current behavior
When I try to run the application using tns run ios , it gives me the following error.
attached picture shows the JS Error in the terminal
Expected behavior
The app should boot up without the JS error just like the web application.
Minimal reproduction of the problem with instructions
git clone "name of the repository"
npm i
cd nativescript
npm i
tns run ios
It installs the app successfully , however, the app doesn't open. On manually opening the app, it gives a JS error.
What is the motivation / use case for changing the behavior?
To get the web and mobile running at the same time.
Please tell us about your environment:
Operating system : MAC OS (Tried it on windows too) 16GB RAM
package manager : npm, tns
**Angular Seed Version: 8aae926
Node: node --version = v8.11.3

Splashscreen wrong since XCode 7

I took over a project using AngularJS, Ionic and Bootstrap to create hybrid apps for mobile devices.
Prior to upgrade to XCode 7 all went well. I updated my HTML-, CSS- and JS-code in editor, ran grunt run:ios to create platform code and opened XCode. From there I built the .ipa-file without any issues (justwith some warnings, which could be ignored).
However since using XCode 7 (needed for iOS 8- and iOS 9-devices), the splascreen will be shown incorrectly. Meaning: Rotated with 90°.
Note #1: The splashscreen and the app have to be Landscape-only.
Note #2: When running grunt run:android, all is well on the Android-based device.
Any idea what to do in order to get the old correct state again?
There is a known bug in the cordova-plugin-splashscreen plugin relating to your issue ( Issue CB-10244 ). Try to update this plugin to cordova-plugin-splashscreen#3.1.0 by re-adding it:
cordova plugin rm cordova-plugin-splashscreen
cordova plugin add cordova-plugin-splashscreen

ionic blank screen with the run command

I've been developing an app with ionic for a week with the
//working flawlessly
ionic run --device --livereload --consolelogs
and it has been flawless the whole time since I started to remove the last 2 arguments
//blank screen of death
ionic run --device
(ionic serve is working well too, without console errors)
After the splashscreen, it's now giving me a blank screen without any errors in the console and i've been debugging this for the last 6 hours without success. I know there's plenty of solutions out there but none of them seems to work for me.
Seems like --livereload is feeding the root www folder while the default run command is feeding the platforms folder www (maybe that's a clue).
Here's my ionic info
Cordova CLI: 5.4.0
Gulp version: CLI version 3.9.0
Gulp local:
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.3
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v0.12.2
Xcode version: Xcode 7.1.1 Build version 7B1005
... I just found out my problem. Apparently loading librairies from a CDN was the problem. Just downloaded all CDN's librairies that I was using into the lib folder and everything is now loading fine.
This can also happen when you have a <base href="/"> in your index.html, which allows livereload to work but prevents bundled apps from loading files.

Does Cordova 1.9 work on iOS 6?

Does Cordova 1.9 work on iOS 6?
I'll be working on it on Xcode 4.5.
I've already installed Cordova 2.0 and it is troublesome issues.
CordovaLib
MainViewController.m
AppDelegate.m
Should I downgrade to Phonegap / Cordova to 1.9 or upgrade to Cordova 2.1? Please advise?
In my condition,I met many bugs when I building Apps by Cordova 1.9 on IOS6.
Even though we can run Cordova 1.9 on IOS6,but the plugins issue or other strange problems would make you tired.
So please upgrade it and face the truth.
I just managed to compile my app with iOS6 SDK with Cordova 1.9.
Make sure you remove armv7s from "Valid Architectures" in your app's "Build Settings". However, this means, you won't be able to target iPhone 5.
(Thanks to Apple, iPhone5 is not available for purchase yet in my country anyways!!, So I still have time to upgrade Cordova :) )
I am still waiting for Cordova 2.2 release. You can check bug reports of Cordova and decide for your own case.

Resources