开发者

Best practice to manage source code with multiple skins in Xcode

I have an iPhone app. I would like to create 2 other versions with different skins. The core code is the same. What's the best practice to handle this? Can I mark groups in the Xcode to skip those skins and use only the unmarked when开发者_运维知识库 I build it? (3 skins groups with different images)

Or can I handle this with git/svn?

Thanks!


I'd probably do that via a shell script phase, something like this (it's basically duplicating a Copy Files phase, but those can't be configured enough):

cp -r "${SRCROOT}/Resources/${SKINNAME}" "${CONFIGURATION_BUILD_DIR}/${PRODUCT_NAME}/Contents/Resources/"


You can create different targets for each of your application and use the resources only required for the current target.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜