views:

541

answers:

2

I want to make two different app icons, and programmatically switch betweem then. When the user quits the app without finishing an workflow-process, then I want to switch to an icon that will indicate that there's something undone when launching the app. Well, just theoretically, just for testing.

I think that the icon file is just a normal file as any other, so if I would just rename it programmatically and then give another icon file the name of the icon file that's named the Info.plist, then the app should show up with another icon, right? Would that be possible? Or do I have no access to that file for renaming it?

+1  A: 

It sounds like a good idea, and I would definitely give it a try, but I get the feeling this isn't possible.

I believe the app icons get stored in another file structure global to the iPhone. I say this because after I installed 3.0 beta 5, I saw a bug where the app icon disappeared from an app I developed. Then after installing two new apps from the app store, the new app's icon appeared on my app, and the 2nd new app's icon appeared on both new apps. Essentially the new app icons shifted to fill in for the missing app icon.

Removing and re-adding the apps, then rebooting the phone, restored the icons properly.

I don't know for a fact how the app icons are managed and stored on the phone, of course, but it would fit to say they are stored in some sort of cached list that gets rebuilt occasionally, perhaps after a reboot. That would mean even if you could change the icon from within your app, it would take more effort to see the effects on the phone.

Ken Pespisa
Good to know! Would have been pretty useful if that were possible. Although it may be an "security problem" as well, since a user might get confused about where the app went to. A mad programmer could make the icon look like the camera icon, for example ;)
Thanks
+4  A: 

icon file stored in "application bundle" folder. And your application has read-only rights to this folder There is no oficial way to change/rename thees files.

You can add integer badge to youy icon

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:666]

But it is not official method.

oxigen
Indeed it is an official method! See the documentation :-)
Thanks