简体   繁体   中英

Updating App icon for an iOS app

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.

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

Apple's own apps are exceptions of course.

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 icon 在此处输入图片说明 .

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM