views:

56

answers:

1

What I am trying to achieve is for the application icon to be different in builds that I send out to my beta testers, to that of the application that will be submitted for approval. This will allow me and my beta testers to easily identify the app is a beta version.

I was not sure if I should be adding a build script to modify the info.plist and change the application icon specified there. For this I guess I would have to conditional check the build type (DEBUG/RELEASE/DISTRIBUTION etc) and write the appropriate value to the plist file.

Alternatively I thought I might need to create a separate target for beta releases and specify the new BETA application icon there.

If anyone has done this kind of procedure before, any tips and ideas about how best to do it would be very much appreciated.

+2  A: 

Both ways you have mentioned can be used for this purpose (Through a separate Target or using Build settings). In my opinion, the more logical way would be to use a different build configuration and set the plist file to dynamically get the icon file name from the build configuration.

Here is how I would do it:

  1. In project build settings, create a new user-defined variable called ICON_FILE (for "All Configurations")
  2. Set the value of the variable to "Icon.png" (for "All Configurations")
  3. Create a new build Configuration called "Beta".
  4. Set the value of the ICON_FILE variable to "Icon-beta.png" for "Beta" configuration.

(this will make all the configurations have the value "Icon.png" except Beta config)

In the Info.plist set the value of "Icon file" attribute to ${ICON_FILE}. This will make the info.plist dynamically get the filename from the variable you defined earlier.

In your application resources, include the beta icon with the name "Icon-beta.png" in addition to "Icon.png" you already have.

If you build the app using "Beta" config, the app will have the beta icon as the app icon.

Hope this helps!

ravinsp
come to think of it, you can achieve the same functionality with "Targets" with much less work.
ravinsp
Thanks, that's a big help. I was leaning towards the seperate target idea more, since I could specify which resources were deployed in each target.I would still be interested in hearing other people thoughts or experiences on the subject.
Steve Wood