I have an iPhone platform. We currently hav开发者_如何学Goe 14 apps in the app store that use the same code base with a few exceptions.
- plist file
- AppStyle.m
- Lot of image assets
I am looking for a better way to manage all these builds and still be able to run an individual build in the simulator.
If I was using Make I would run through a series of scripts to get the build directory set-up based on which app I was building. And the particular app would just be a variable to the build. As it stands now I am adding a Target for each new app and assigning assets and .m files via Xcode.
There must be a better way.
If you're familiar with make, then just use make to write your build scripts.
- Copy your plist, style tool, and assets to the appropriate locations in your project
- trigger the project to build using the command line tool
xcodebuild
. - launch it in the simulator using something like
iphonesim
http://www.manpagez.com/man/1/xcodebuild/
https://github.com/jhaynie/iphonesim
Another approach to doing this kind of thing is to put the shared code into a common library or framework, then prepare a project template that automatically includes the library and any other project prep. When you need to start a new project, use that project template instead of the standard templates, and just edit the branded/styled bits as appropriate.
精彩评论