开发者

Settings bundle with non-standard name

开发者 https://www.devze.com 2023-01-14 20:23 出处:网络
May I use a settings bundle i开发者_运维问答n xcode which is not called Settings.bundle? If I have multiple settings bundles (for multiple build targets), must I define these additional names anywher

May I use a settings bundle i开发者_运维问答n xcode which is not called Settings.bundle?

If I have multiple settings bundles (for multiple build targets), must I define these additional names anywhere? My application seems to always look for one called Settings.bundle.


For those of you who aren't good at shell scripts, here's a template version of what I used. In addition to a Debug and Release build, we also had a Debug-Special build with its own Info.plist in the build settings, and a different Settings.bundle/Root.plist file. I created copies of the Setting.bundle/ folder to Settings(original).bundle and Settings(special).bundle and added this script to the pre-build:

subdir="original" ; [[ $CONFIGURATION = "Debug-Special" ]] && subdir="special" ; cp "$SRCROOT/Settings($subdir).bundle/Root.plist" "$SRCROOT/Settings.bundle/"

Be sure to select your project to add the environment variables to the shell that runs the script.

I realize the thread is pretty old in code years but it is still relevant, and hopefully this will save the next person who finds it some time.


Solved this by adding a script in pre-build where the alternative bundle is renamed to Settings.bundle

0

精彩评论

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

关注公众号