简体   繁体   中英

the last called function on mono touch-iphone platform

当用户单击主页按钮或应用程序崩溃时,是否有任何方法或调用的方法?

Yes, the UIApplicationDelegate.DidEnterBackground is invoked on your app before it goes to the background:

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm?UIApplicationDelegate/applicationDidEnterBackground :

Nothing is called if your application crashes.

In some cases, like a managed exception, you can set the [AppDomain.UnhandledException][1] event to be notified - but there's not a lot you can do at this stage.

However that does not cover crashes that will occurs in native code. There are products that can log and report such crashes but they won't let you execute your own code (and can't for many crashes like out of memory conditions).

Eg How to capture iOS crashes in MonoTouch application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM