开发者

can i update my local text file on iphone

i have a text file so can i update this text开发者_如何学运维 file from web ??? lets say i have

   1. NSString *filePath = [[NSBundle mainBundle] pathForResource:@"MyFile" ofType:@"txt"];  
   2. NSData *myData = [NSData dataWithContentsOfFile:filePath];  
   3. if (myData) {  
   4.     // do something useful  
   5. } 

right now Myfile.text is having 10 data so how to insert 10 more to this data??

plz help


Files stored inside your app bundle will not be writable.

You will have to make a copy of the file and store it in the Documents or Library folder before you will be able to edit it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜