How to set up your iPhone project to use a separate beta app icon

I am trying to ensure that the application icon will differ in the lines that I send to my beta testers, in that the application that will be sent for approval. This will allow me and my beta testers to easily identify the application as a beta.

I was not sure that I should add the assembly script to change info.plist and change the application icon indicated there. For this, I assume that I will have to conditionally check the type of assembly (DEBUG / RELEASE / DISTRIBUTION, etc.) and write the corresponding value to the plist file.

As an alternative, I thought that I might need to create a separate target for beta versions and specify a new BETA application icon there.

If anyone has done this before, any advice and ideas on how best to do this will be greatly appreciated.

+5
source share
3 answers

Deprecated: As of September 2017, my answer is probably outdated. Please use the latest Apple Developer Guides related to Asset Catalogs . Asset directories are a new way to specify image / icon resources for your application.

Original answer:

, , ( Target Build). , plist .

:

  • ICON_FILE ( " " )
  • "Icon.png" ( " " )
  • "".
  • ICON_FILE "Icon-beta.png" "Beta".

( "Icon.png" , Beta)

Info.plist " " ${ICON_FILE}. info.plist .

"Icon-beta.png" "Icon.png" , .

, "Beta", .

, !

+11

.

, :

1 - ( ) , images.xcassets

appIcon1 appIcon2

2 -

demo configuration

3 - Target → Build Settings . " " - "". , .

application icon name for configurations

4 - .

screen screen screen

+7

xcassets. , xcassets, :

. :

  • . → Duplicate ( Cmd + D)
  • , MyApp-beta​​li >

:

  • xcasset.
  • New App Icon
  • icon-beta, -
  • -
  • GeneralApp Iconsicon-beta

. -!

, . ( Bundle Identifier).

+1

All Articles