Reputation: 13813
I am a beginner. at the moment, I am using Xcode8, since most of tutorial I follow and some app I have built is in Xcode8. so I still using Xcode8 at this time. because I am worried it will cause a problem when my previous app is opened in the Xcode9.
I want to test applicationWillTerminate
method in app delegate, that will be triggered when the app is terminated by the operating system for example. the tutorial i follow along is using Xcode9, and it is easy to simulate termination in Xcode9. but i don't know how in Xcode8.
so, how o simulate app termination in Xcode8?
Upvotes: 0
Views: 185
Reputation: 100503
If you're looking to test your applicationWillTerminate methods, set UIApplicationExitsOnSuspend to YES in your .plist and then switch apps or press the home button. Make sure you set the key to a Boolean, not the string "YES".
Upvotes: 1