[英]how to clean NSUserDefault while my app is crashed
我想在我的应用程序崩溃或崩溃时清理UserDefault,该怎么办。Apple是否为我提供了API?
You can follow this method delegate when crash, do something to clear NSUserDefaults or others actions. 您可以在崩溃时遵循此方法委托,进行一些操作以清除NSUserDefaults或其他操作。
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.