Does WillTerminate method fire when stopping an application in MonoDevelop
I am trying to find out if the WillTerminate method of the UIApplicationDelegate class fire when the application is terminated in MonoDevelop? I ask this because I have set up my application to close the database connections when the application terminates, and it does not seem like this is happening when I stop the application from MonoDevelop.
I know开发者_Python百科 that iphone applications should not have a "close" function, but is there some way of simulating an application close on the simulator so I can test the execution of the WillTerminate method?
No it does not, it forcibly exits the application. To test the behaviour you can add:
<key>UIApplicationExitsOnSuspend</key>
<true/>
To your Info.plist, and click the home button.
精彩评论