且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

NSMutableArray writeToFile:atomically总是在设备上返回NO但在模拟器上工作正常

更新时间:2022-11-23 13:45:23

您无法写入应用程序的包中,因此您无法在资源中写入plist目录。一个好方法是在第一次启动时将plist从Resource目录复制到Documents目录,并在将来从那里访问它。

You can not write into the application's bundle so you can not write to a plist in the Resources directory. One good way is to copy the plist from the Resource directory into the Documents directory on first launch and access it from there in the future..