writing to info.plist file

Discussion in 'iPhone' started by tusharsquad, Apr 23, 2010.

  1. tusharsquad macrumors newbie

    Joined:
    Apr 23, 2010
    #1
    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];
     
  2. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #2
    There is an iPhone developer forum here. You'll be better suited to asking this question over there.
     
  3. Menge macrumors 6502a

    Menge

    Joined:
    Dec 22, 2008
    Location:
    Amsterdam
    #3
    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).
     

Share This Page