这两天在处理 app退出后删除本地数据 在appDelegate里的这个函数里设置发现进不去
- (void)applicationWillTerminate:(UIApplication*)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
后来查找了一些自料
要在main.m文件中设置就OK了
例如:
[[NSUserDefaults
standardUserDefaults]removeObjectForKey:@"DeviceToBle"];
[[NSUserDefaults
standardUserDefaults]synchronize];