Altering .plist Outside of Xcode?

Discussion in 'iOS Programming' started by HarryWorksInc, Apr 17, 2010.

  1. HarryWorksInc macrumors regular

    Joined:
    Feb 21, 2010
    #1
    Is there a way to alter a string in the .plist such as the icon file from inside you app? Such as a user could choose the icon image they want?
     
  2. Matthew Yohe macrumors 68020

    Joined:
    Oct 12, 2006
    #2
    Nope, that is contained in the main bundle which is read only and therefore is not modifiable.
     
  3. HarryWorksInc thread starter macrumors regular

    Joined:
    Feb 21, 2010
  4. bredell macrumors regular

    Joined:
    Mar 30, 2008
    Location:
    Uppsala, Sweden
    #4
    You can change your plist if you put it outside of your main bundle, e.g in the documents directory. You can either create a new plist outside of the main bundle or copy a plist with default values from the main bundle to the documents directory. After that you are free to read and write to the plist.
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    But the Info.plist must reside in the main bundle and the changes the OP wants to make (such as the app icon) only have effect when they're in the Info.plist.
     
  6. bredell macrumors regular

    Joined:
    Mar 30, 2008
    Location:
    Uppsala, Sweden
    #6
    Oh, sorry. Yes, if we're talking about the app's Info.plist then it can't be changed. I thought the OP was talking about a generic plist file.
     

Share This Page