Question Can one Xcode project create multiple products ( Mac Forums iPhone Programming ) Updated: 2008-11-23 02:20:01 (3) |
|
Can one Xcode project create multiple products
I have created an app, let's call it A, and now I want to create a new app, let's call it B, where B is a superset of A -- that is, B has everything in A plus some more. But I still want to maintain A as well. I could simply make a copy of A and then start adding the 'B' functionality, but then I would have to make fixes to 'A' functionality in both places. Can I configure my Xcode project to have two different targets, A and B, where:
- A and B have different main nibs
- A and B have different plist.info files
- A and B have different names
etc..
any tips from those who have done this would be appreciated
beachdog
|
|
| Answers: Can one Xcode project create multiple products ( Mac Forums iPhone Programming ) |
|
Can one Xcode project create multiple products
It sounds like your problem's solution will be far simpler than what I'm about to describe (perhaps you're making a Lite and regular version of an app?), but this is how I handled shared code between my apps.
I chose GIT as my version control system because of its support for Submodules. Submodules allow you to share code between multiple repositories so that an update to the submodule in one project will update that code in every other project that uses that submodule (each repository must "opt-in" for each update). In your case, each app could be its own repository and the code shared between the apps could be a submodule so each app can always have the latest shared code. Or A could be a repository and a submodule for B.
ace2600
|
|
Can one Xcode project create multiple products
Each target in a project builds a different binary. Each file in a project can be in one or more targets. If you're developing two apps that share a lot of code you can make them two targets in one project.
You should read the Xcode project management guide for the details.
PhoneyDeveloper
|
|
Can one Xcode project create multiple products
It's easy to create 2 different targets in XCode, with 2 different product names, and 2 completely different sets (or partially overlapping sets) of source code and nib files. Use the little checkboxes in the XCode project group file browser to select and deselect different class and nib files for each project. Then edit the target settings for product names, & etc. You can also add target specific defines and use #ifdef's in your source code.
The problem seems to be with the Default.png, Icon.png, and Info.plist files. Renaming the icon file seems possible, but there may be reports that apps with renamed app icons have problems with uploading to the app store. Maybe a build script can be added to symlink or copy these 3 files into the project directory from a set of sub-directories before each build?
.
firewood
|
|
- Source: - Previous Question: Mac Forums MacBook, iBook - Next Question: Mac Forums iPhone Programming |
|
|