I want to create two iphone apps with very similar code base. The only differences will be some settings and the UI skin. Instead of creating two xcode project and copy the all the code over. Is there a better way to set this up? for better maintainability? 95% of the code are the same.
Share
Yes, you can do that. You should not create two XCODE projects as you are already guessing.
For differences in your code for each version, you can use C preprocessor directives.
#ifdefand related commands.For differences in the UI, you can create multiple targets, each one using different XIB files if you want.
For settings differences, you can also create multiple targets, each one using different .info files.
Check out this and this blog entries on using multiple targets within XCODE.