再杀掉app以后 删除NSUserDefault存在本地的数据

这两天在处理  app退出后删除本地数据  在appDelegate里的这个函数里设置发现进不去app

- (void)applicationWillTerminate:(UIApplication*)application {函数

// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.rem

}io

 

后来查找了一些自料数据

要在main.m文件中设置就OK了di

例如:文件

[[NSUserDefaultsvi

standardUserDefaults]removeObjectForKey:@"DeviceToBle"];sync

[[NSUserDefaultsdata

standardUserDefaults]synchronize];

相关文章
相关标签/搜索