开发者

iPhone - Branding & multiple targets?

I am trying to create 2 versions of the exact same app with 2 different branding? So i created 2 folders in my project

Resources -> Folder1
Resources -> Folder2

I added Folder1 to target 1, and Folder2 to target 2. The 2 folders contain 2 images named the same but they look different.

However, doesn't matter which target I build it always uses logo in my Folder1 folder. Although this folder only belongs to ta开发者_开发技巧rget 1.

Any way around this?


So these are folders with the same name and not groups? Do the folders have the same name? (Make sure you have folders and not groups.)

Try creating two folders on disk brand1/resources and brand2/resources add both "resources" folders to the project, enable one for one target, enable the other for the other target.

Are you using different info.plist files for each target to give each one a different name? Is one target overwriting the other in the build dir?

When you add a folder to a target the folder will be included in the app bundle with that actual name, so folder1 will be called folder1 and folder2 will be called folder2. As a result the code will have to detect which one is there.

You might also try adding the resources individually to targets instead of using folders.


In order to switch between targets 2 steps are required:

  1. Change the target on top left of XCode.
  2. In tree view in XCode select executable, and from the list select the executable for your target.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜