0

This question has been asked before also but i have a slightly different question to the previous ones or we can say an extended version

Q1) I tried updating the icon app by adding the image in asset catalog and pointing the "Target" app icon setting to that. The app icon is updated in my Xcode but not reflecting when i run the app.I read somewhere that i have to update this in my "Project" file as well. this can be done by following the path Project->General->App icon. The problem is that this "General" panel is visible for me only in Target and not in "Project" File.I only have "Info" and "build Settings" for Project. I am using Xcode6.1

Q2) I'll go ahead and be optimistic in assuming that i'll get a solution for this which takes me to my second question.

Is it possible to dynamically update an app icon? For eg-> i have my app icon as red, now once i launch my app i have a menu of colours to select from. Once i do select one colour say green.., my original app icon should update to green. so that when i minimize or quit my app the icon has turned to be green.One live example of this is the Calendar app and the Clock app available in iOS where the icon keeps changing relative to date and time

Thanks for the solutions in advance.

Vkharb
  • 856
  • 11
  • 19

3 Answers3

1

No, you can't change your app and the resources in its bundle.

Apple's own apps are exceptions of course.

shim
  • 9,289
  • 12
  • 69
  • 108
Helge Becker
  • 3,219
  • 1
  • 20
  • 33
1

You cannot dynamically update the app icon.

When you update the app icons (just the assets, no need to update project settings), clean and build your app in order to see the new ones. If you cannot see them, just delete and reinstall the app. Make sure that you include all the needed image resolutions for your icons.

Make sure that your icon asset is selected as the app iconenter image description here.

Nikos M.
  • 13,685
  • 4
  • 47
  • 61
  • thanks for the quick response. Although i have done all this already. Right from Cleaning , deleting the app to restarting the simulator . I have included all the needed resolutions also but nothing seems to be working out. – Vkharb Mar 11 '15 at 14:16
1

For your first question, I changed all my icons by simply creating a new icon set in Images.xcassets in the project Source tree. You will need to make sure you have icons of the right size for all your targets. You can either point your project at the new set or rename the old set and call your new set AppIcon. If you want to change the set name, the icons set used is defined in project settings in the general tab under the title "App Icons and Launch Images". Apart from that you should not need to do anything else. On the simulator, removing the app and restarting might help.

For your second question the answer would seem to be that you cannot but Apple can. Never noticed before, but the clock app icon actually has a moving second hand and has the current time. So clearly possible but looks like it is not allowed for normal folks: How to animate application icon in iOS?

Community
  • 1
  • 1
Rory McKinnel
  • 7,936
  • 2
  • 17
  • 28
  • I have seen multiple instances of people mentioning of " general" tab in "Project".However this tab only appears for me in "Target" setting, for Project there is only Info tab and Build settings tab. I am only able to set my App icons in my Target setting and this seems to be the problem. Any ideas? – Vkharb Mar 12 '15 at 06:08
  • I think that is the same settings area. Will check when on mac. Also worth checking the compiler warnings tab on the project navigator to see if there are any warnings about the assets catalog in case it does not like some of the images. – Rory McKinnel Mar 12 '15 at 07:37
  • Thanks!! This was actually the problem. My deployment target was iOS 6 and the images were configured for iOS8 only. The compiler was throwing warning but i missed them.Once i changed my deployment target to iOS 8 it worked. – Vkharb Mar 12 '15 at 08:30