After more testing Iāve narrowed down the exact path to reproduce this error:
Install app on iPhone using XCode
Once app is launched, go home by pressing home button on the device
Double press home button to launch recent apps/task manager
Swipe the cordova/ionic app up to kill it.
iPhone is now āfrozenā
I get an (lldb) in the console and this pops up in the debug console:
The good news is that this doesnāt happen if you install the app on the iPhone and then unplug the device from XCode. Then you can run and kill the app as much as you like and everything continues to function.
I tested this with the helloWorld app as well as my own app and confirmed the same behavoir on both.
Anyone know why this happens when connected to xCode?
$ ionic start tmp tabs && cd tmp
$ ionic platform add ios
$ open platforms/ios/tmp.xcodeproj/
Installed on my iphone6 with out any issues.
Did you change anything or add any new plugins?
Was version of osx are you using?
What version of xcode are you using?
I find that I get ālockupsā if I RUN the app on my device on my iPhone from XCode when I do the following:
If I forget to use XCode to shut down the app and instead press the āHomeā button to close it, then try tapping on the icon to open the app again. Usually get the shaded icon and the entire phone locks up.
If however, I shut down the running app from within XCode, by clicking the āStop Runningā button, then I can restart the app on the device with no problems.
I believe it has something to do with how the XCode debugger works. Either the PC or the device is trying to poll each other constantly and if I deviate from what they are expecting it causes problems on my iPhone.
So, my basic rule when developing is: Use XCode to install and āRunā the app on the phone, and as soon as it starts up, use XCode to shut down the app, then revert to the device to start up the app and do other tests.
@CyberFerret Thanks, this helps me prevent the issue I was having.
Iāve been using Android Studio for a couple years now and am used to pressing ārunā and getting the debugger console but was not expecting:
Xcode to maintain some active connection (although I can see the function in this)
If that connection is broken - to mess with the phoneā¦ I would have expected Xcode to throw an error about a process being killed or something but to block the mainthread (thats my understanding at least) on my phone seems bizarre.
Most surprising is that I couldnāt find a single SO post about thisā¦ I canāt be the first newbie iOS dev to experience this.
@mhartington, I tried the tabs started on my 5 and 6+ and it works fine o.O
Just to clarify: installing the app isnāt the problem. Itās force closing it while its still connected to the active Xcode debug session that would cause the device locking.
I tried my app and the helloCordova starter on both devices tonight and theyāre both working fine - Iām able to force close and restart without locking the device
OSX: 10.10.2
Xcode: 6.1.1
I think Iāll just adopt @CyberFerretās recommendation of running the app in Xcode and then making sure to Stop it before disconnecting or force quitting.
Iām just used my android logcat where I can do whatever and I can see what goes on as my app launches AND as it closes, Xcode just seems to give me warnings about how Iāll get kicked out of the app store for x, y & zā¦
Much appreciate the support! Loving ionic so far, itās truly remarkable.
Yeah thats to be expected.
When you run an app via xcode, it has a few processes going on in the background (debugging tools, watching cpu/memory, etc)
It got me as well when I first started out to be honest
I kept having this happen when the debugger and phone are still somehow linked, so a simple command line of āpkill lldbā before āionic run iosā will ensure it doesnāt happen again.
iPhone frozen, donāt worry, you can try to use Tenorshare iPhone Care Pro to help you fix iPhone frozen . The software is a good tool to repair operating system for iPhone .
Tenorshare is not the most professional solution. Some other method may better than it. You can read this which I search on google. By the way, the method also can fix many different kind of iOS system problem. Fix iPhone Frozen
Hey, do you fix your issue right now? If you donāt, you can try to force restart your iPhone first and then see whether it performs normally. Or you can unfreeze your iPhone through some software like Joyoshare UltFix, TunesKit, etc without data loss.