1

There are several schemes in my project, for each scheme there is an Icon image file in the Images.xcassets folder, like this:

AppIcon-DEV

AppIcon-QA

AppIcon-PROD

In order to show the right Icon along with a specific scheme, we need to modify the Asset Catalog in Build Settings like this:

Asset Catalog App Icon Set Name

        DEV                          AppIcon-DEV
        QA                           AppIcon-QA
        PROD                         AppIcon-PROD

However the problem is, after archiving the project the name of the Icon image would be like "AppIcon-DEV", which can not be accepted by the client.

So my question is: is there any way that can automatically truncate the Icon name "AppIcon-DEV" to "AppIcon"?

Beau Nouvelle
  • 6,962
  • 3
  • 39
  • 54
Dustin Jia
  • 67
  • 7

1 Answers1

0

EDIT: In my screenshots, the icon still has suffixes. For xcode, the entire 'app icon set name' string is the valid name. So you should be able to name the icon set which you use for archiving as AppIcon.

Image assets allow adding multiple App Icon sets

enter image description here

and iOS target settings allow setting the app icon asset name for each configuration

enter image description here

This should allow you to add separate icons for Debug, AdHoc and AppStore builds.

Swapnil Luktuke
  • 10,385
  • 2
  • 35
  • 58
  • I understood that, actually that's the problem I was describing. Our situation now is if we need to show the DEV team we manually change the name "AppIcon-DEV" to be "AppIcon", and if we need to show the QA team, we change "AppIcon-QA" to be "AppIcon" manually, which is not convenient. My leader asked me to solve this problem, I just totally have no idea. Maybe we need some Run Script staff I guess. – Dustin Jia May 04 '15 at 16:57
  • Instead of changing the icon name manually, you can create multiple configurations and have separate DEV, QA, TEST and PROD builds (all distribution) with separate bundle identifiers and separate icons and display names. Having different bundle ids will allow you to install each of those versions on the same device and different icon and name will help you distinguish each one from the other. Share only the relevant app with respective team. – Swapnil Luktuke May 05 '15 at 12:51
  • @DustinJia [Check out answer for this question](http://stackoverflow.com/questions/29348505/how-to-manage-production-and-development-credentials-using-facebook-ios-sdk/29350439#29350439) .. although it is for facebook app id, you can do the same for bundle identifiers and create multiple apps as mentioned in previous comment. – Swapnil Luktuke May 05 '15 at 12:52
  • Thanks. That may work, but unfortunately I don't have the right to modify the bundle staff. Our project already been developed for a few month by several teams, actually no one dare to touch such sensitive parts. But anyway thanks for your help! – Dustin Jia May 06 '15 at 05:06