Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone: Use different icons with different build targets?

Right now I have a regular iphone app with unique springboard icon and splash screens. Now I want to create basically the same app with minor changes - and this app will have a different name, different springboard icon and different splash screens. So basically what I did now was to duplicate the original build target - but how do I add another icon.png to my project and tell XCode to use the relevant icon for each build? And what about the splash screens?

like image 949
Alex1987 Avatar asked Jun 09 '11 07:06

Alex1987


4 Answers

Xcode 6 – Xcode 9

  1. Go to images.xcassets and click the plus button to create a new app icon. You should have one app icon set for each build.
  2. Go to project -> build settings and search for "asset catalog app icon set name". In each of your targets, change the name of the app icon set name to match the names you entered in step 1.
like image 168
rizzes Avatar answered Oct 25 '22 03:10

rizzes


Every target will have a different info.plist file

In this file you can specify icon, splash screens, displayed name ...

like image 36
AmineG Avatar answered Oct 25 '22 03:10

AmineG


It is not necessary to drag your iconfiles to the helpareas on the summary of the target. Just name the files correctly (Icon.png, [email protected] etc.) and add them as resources in your project and make sure to only add them to the bundle of the target they are needed in, and they will be used automagically.

You could create two sets of iconfiles, and when dragging them into your project uncheck the boxes for the targets they are not used in.

like image 43
Simen Øian Gjermundsen Avatar answered Oct 25 '22 04:10

Simen Øian Gjermundsen


Ok I found the answer and it's rather simple. As I already mentioned I duplicated the target that I have - and changed the product name. Then there is the tricky part with the app icon and the splash screen. What I basically did was to delete these files from the project folder and move them to an external folder. Then I would create another external folder for images of the new target. Then I would add references of the images (very important not to copy them!) to the project for each build.

like image 23
Alex1987 Avatar answered Oct 25 '22 05:10

Alex1987