iOS using existing project's class/resource files in another project
I have an existing xCode project for an iPhone application which is in the App Store. The project contains many view controllers/view XIB files/images/etc. I wish to create another project which behaves in the same exact way containing the same controllers/views/images/etc except i wish to change small things such as the bundle identifier or changing a value of a preproc. defined variable.
I do not want to duplicate the existing project. if i need to make changes to 1 i will need to make the same changes to all others(what if i had 500+ projects? nightmare!)
What do you advise when creating such a new project?
Should i recreate the source of the existing project into a more easily distributed/shareable proje开发者_如何学JAVAct so that it can be used in multiple projects? How would i go about doing this?
What kinds of files cannot be shared while creating a codebase like this(which files need to be created or be hand coded for every new project)?
I have a similar scenario and how I handle it is as follows:
1) the core code of the app is kept in a "application_name-base" folder
2) different clients/apps are in their "application_name-client_name" folder
3) in the "base" folder the core source code is all kept.
4) the project file is in the client folder and includes the references from the base folder without using copy.
5) files that need to be unique to the a specific client's project are in the client folder. Usually images using the same name. or .h/.m files that need to be unique to the individual project. (e.g. logo.large.png) Also allows for you to not include .h/.m files on a project by project basis.
6) any centralized update in the "base" folder code will be reflected in the "client" projects on their next build.
Keeps code central but allows for different code per client without leading to confusion.
精彩评论