Dree
Dree

Reputation: 722

Debug app after device restart

I have an issue on my iOS app that occurs every time I restart my iOS device (i.e. after turning it off and on again). I turn off the device with the app in foreground, restart it and then relaunch the app from the background.

Obviously, the Xcode console doesn't show debug message when the device is turned off and I don't manage to know what happens to the app when the device is restarted. If I restart the app from Xcode, the issue disappears and everything works flawlessly again.

Also, it seems that the app is relaunching itself from the background when the device restarts. Is it possible to prevent this behaviour and force the app to restart from scratch when I tap on the app icon or on its screen from the multitasking?

Thanks.

Upvotes: 2

Views: 2069

Answers (1)

Hodson
Hodson

Reputation: 3556

If you want to force close apps, double tap the home button and then you can swipe away the background process.

To debug the process after restarting the device and opening the app again, you should be able to attach the Xcode debug console to the running process. In Xcode do:

Debug > Attach to process > [select your process]

Upvotes: 2

Related Questions