views:

1734

answers:

1

I have a product with two targets, one for iPhone and the other for iPad. I will build two separate applications, not universal.

As I will have to have two icon.png files for the application's icon, as they differ in size, as I see I will have to have two info.plist files. right?

I have created two copies of the info.plist file, named iphone-info.plist and ipad-info.plist. I have right clicked each one and assigned them to a specific target.

Now, when I compile I see this error:

Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'iPhone-Info.plist'.

If I remove the target assignment from both info files, the error vanishes.

here are the questions I have:

  • If I cannot set a target for info.plist, how each target knows which info.plist to use?
  • Is there another way to make each target have its own icon without using two plists?

thanks for any help.

+5  A: 

If you get info on a target, click the "Build" tab, and type "plist" into the search box, you will see that the Info.plist file it expects to build that target with is listed in the Build settings. Change that to point to the file name of each plist file you want for each target.

Setting the target for each plist only adds it to the target build like any other file - to actually tell the app to use a particular plist file as "THE" plist file with relevant info, you also need to set it in the target settings.

CC
thanks! I did that and unchecked the target on the plist itself and now everything is fine! Thanks!
Digital Robot