我希望在我的应用崩溃或崩溃时清理我的UserDefault,该怎么做。是否有来自Apple的API?
答案 0 :(得分:0)
您可以在崩溃时遵循此方法委托,执行某些操作以清除NSUserDefaults或其他操作。
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}