lz465350

iOS 两种易混淆的存储路径

一,NSBundle

1>我们可以通过解压等操作获取 NSBundle 中的内容.

2>NSBundle主要是包路径,也就是代码编译后的 imge 和 sb 资源文件...

3>例如:[[NSBundle mainBundle]pathForResource:@"history" ofType:@"plist"]

 

二,NSDocumentDirectory

1>也就是 iOS 的存储.可以用 iTunes 备份的数据

2>分为用户偏好设置, NSArray/NSDictionary等的存储,归档设置.

3>NSString *homeStr = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject;

分类:

技术点:

相关文章:

  • 2021-11-05
  • 2021-09-19
  • 2021-05-21
  • 2021-11-25
  • 2022-03-06
  • 2022-01-16
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2021-11-17
  • 2021-11-04
  • 2021-07-12
  • 2021-09-08
  • 2022-12-23
  • 2021-10-23
  • 2022-03-01
相关资源
相似解决方案