Can i change the iPhone App icon on runtime?

Discussion in 'iPhone Tips, Help and Troubleshooting' started by kalariyaamit, Aug 7, 2009.

  1. kalariyaamit macrumors newbie

    kalariyaamit

    Joined:
    Sep 18, 2008
    Location:
    Ahmedabad, Gujrat - India
    #1
    Hello All,

    I want to change my iPhone application icon on run-time, i want to change icon on some event.

    I've already tried many things.

    Like:
    1) run time change info.plist file,
    -----------------
    NSString *finalPath = [path stringByAppendingPathComponent:mad:"Info.plist"];
    NSMutableDictionary *plistDictionary;
    plistDictionary = [[NSMutableDictionary dictionaryWithContentsOfFile:finalPath] retain];

    [plistDictionary setValue:mad:"NewApp Name" forKey:mad:"CFBundleDisplayName"];
    [plistDictionary setValue:mad:"New-icon.png" forKey:mad:"CFBundleIconFile"];

    [plistDictionary writeToFile:finalPath atomically:YES];
    -----------------
    It's working fine on iPhone simulator but, not working on my iPhone Device.

    2) Replace Old icon.

    I've also tried to remove old icon and copied new as a old icon name.
    this is working fine on iPhone simulator but, not working on my iPhone Device.

    Please Guide me.
     
  2. netslacker macrumors 6502

    Joined:
    Jan 21, 2008
    #2
    Wrong forum.

    But in short, you can't do it and still comply with SDK.
     

Share This Page