Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Xcode, how do I use a different AppIcon for each target iOS App?

Tags:

xcode

ios

I have one Xcode project (in Xcode 6.1) with a 4 targets for 4 different apps that share a lot of the same source code.

I'm trying to have each one of them show a different app icon.

Going into Project > General > [select target] > App Icons and Launch Images, I see this:

Different AppIcons

But clicking on each AppIcon, I get to the exact same app icons - not the ones that I would like for each project.

Is this just a bug in Xcode? How can I use different app icons for different targets?

like image 975
gabor Avatar asked Oct 31 '14 06:10

gabor


People also ask

How do I change my target app name in Xcode?

Rename the Target to Rename the App Select the project from the project navigator to open the project editor and see a list of the app's targets. To rename a target, select it, press the Return key, and enter the new name. If all you want to do is rename the app, you're finished.

How do I change my target app icon?

Press and hold the app icon until a popup appears. Select “Edit”. The following popup window shows you the app icon as well as the application's name (which you can also change here). To choose a different icon, tap on the app icon.


2 Answers

  • Click on your already existing xcassets File, where you have defined the Appicons for your first target and add a new Appicon.:

enter image description here

  • You can give the new Appicon a meaningfull name (In my case Appicon-Debug):

enter image description here

  • Go to your targets and select the new target:

enter image description here

  • choose the new AppIcon under General -> "App Icons and Launch Images" -> "App Icons Source":

enter image description here

  • Clean the project and rebuild it.
like image 176
mcfly soft Avatar answered Sep 23 '22 21:09

mcfly soft


  1. Go to your app's Assets.xcassets and create a new iOS App Icon by clicking on the + button in the bottom left corner of target's section
  2. Name it AppIcon-Test or Debug or whatever name suits you.
  3. Go to xcassets folder and in the utilities panel allow target membership to both in the File Inspector View. Make sure the all target membership's are enabled for both AppIcon sets.
  4. Select the target for which you want to change icon in the project settings. In "General" Scroll down to App Icons and Launch Images. Select your appicon set for the respective target in App Icons source

Go to your app's Assets.xcassets and create a new iOS App Icon by clicking on the + button in the bottom left corner of target's section

Name it AppIcon-Test or Debug or whatever name suits you.

Go to xcassets folder and in the utilities panel allow target membership to both in the File Inspector View. Make sure the all target membership's are enabled for both AppIcon sets.

Select the target for which you want to change icon in the project settings. In "General" Scroll down to App Icons and Launch Images. Select your appicon set for the respective target in App Icons source

Happy coding :)

like image 31
Muhammad_Awaab Avatar answered Sep 24 '22 21:09

Muhammad_Awaab