开发者

Can an Xcode project with multiple targets have different Settings.bundle's for each target?

开发者 https://www.devze.com 2022-12-20 04:36 出处:网络
I have a settings bundle in an iPhone app which has several subtle variant targets. The problem is I need to customise some strings in开发者_Go百科 each settings bundle to make them appropriate for e

I have a settings bundle in an iPhone app which has several subtle variant targets.

The problem is I need to customise some strings in开发者_Go百科 each settings bundle to make them appropriate for each target. It appears that if the Settings bundle is named anything other than Settings.bundle it won't pick up the bundle (understandable, can I specify in a plist somewhere the alternate name?).

If I try and put them in different folders and call them the same thing Xcode gets horribly confused and lets you edit "2 files" that are actually the same single source.


I see no problem. For every target, create a specific folder with files for this target. Now create a group in Xcode for every of those folders and drag each of the new Settings.bundle directories to the corresponding group. When adding the bundles to the project, make sure that every bundle is only built (included) for its target by checking the appropriate box.


AFter you do what MrMage said which is correct.. i had an issue where the Root.plist would not show up under the Settings.Bundle for a specific target.

You have to let xcode know what the setting.bundle file is... click on the settings.bundle that wont show the Root.plist, then go to file inspector

Alter the file Type drop down to be applicationBundle ... now the Root.plist shows up.

0

精彩评论

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