这两天在处理  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];

 

相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2021-12-19
  • 2022-02-10
  • 2021-04-17
  • 2021-08-02
猜你喜欢
  • 2021-07-26
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案