Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tusharsquad

macrumors newbie
Original poster
Apr 23, 2010
7
0
hi,
i want data to write pemanatly to the info.plist file ,
but with the follwing code data gets or objects are no longer exist or they are not actually get written into info.plist permantly
plz hep me
code is as follwing


NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *finalPath = [path stringByAppendingPathComponent:mad:"Info.plist"];
NSMutableDictionary* plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:finalPath];

[plistData setValue:mad:"item" forKey:mad:"item"];

[plistData writeToFile:finalPath atomically: YES];
 
If you write to the Info.plist file, your app will no longer run because the app signature will be broken. Don't write to any file inside the application bundle.
Write in the Documents or Caches folder (depending on what you want to write).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.