Writing into plists in iOS 5.0.1

前端 未结 1 1513
感情败类
感情败类 2021-01-24 18:38

I am using the following code to write into a plist:

  NSMutableArray *d = [[NSMutableArray alloc] initWithContentsOfFile:
                     [[NSBundle mainBu         


        
相关标签:
1条回答
  • 2021-01-24 19:05

    You can't modify the main bundle on the device, you don't have the privileges to do that. So you can't write a plist into the main bundle. I doubt this worked on the 4.3 device, it just may not have given you an error.

    You should save data into the documents directory, there are tons of code samples on here for getting a path to the documents directory.

    0 讨论(0)
提交回复
热议问题