views:

534

answers:

3

The calender app does it... How can I make an app icon change based on stored info from the iPod or iPod app settings?

EDIT: I realized today that it is possible to access bundles via the sdk. (At least read access) If I had a graphics API (OpenGL, perhaps) then I could possibly modify the icon like that. The operation would be:

  • get icon.png from bundle.
  • modify it
  • resave it into the bundle.

Does that make sense?

+2  A: 

Unfortunately you can't using the SDK (which of course Apple isn't restricted to with the Calendar app) - you can do badges but the image has to be static.

Jon
Ok. I'll be that's why (among other reasons) the calender API is nonexistent from Apple. Thanks.
Moshe
+2  A: 

In answer to your edit: no, you cannot alter any files inside your bundle; your application is sandboxed to only have write access within its documents, cache, and temporary directories.

Noah Witherspoon
What if the plist referenced a file inside the sandbox?
Moshe
I heard of some hack that made something like that happen... the file being a symlink inside the bundle, or something like that. It was a while ago, though—there's a good chance it's been fixed by now.
Noah Witherspoon
+1  A: 

Just as a note, Apple's Calendar app is actually hardcoded into the system to display a view over the icon. Put it on the left of the first page and drag to SpotLight, you will notice that the text fades out differently.

chpwn
Interesting observation. Wierd though.
Moshe
It's due to the fact that since it is a black text view over a white background, it fades to white, but the icon itself fades to black since it becomes invisible. To do it correctly, they would have to not fade the calendar text.
chpwn