Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two iPhone Apps with same code base

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.

like image 674
Melina Avatar asked Jul 01 '26 16:07

Melina


1 Answers

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. #ifdef and 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.

like image 132
Pablo Santa Cruz Avatar answered Jul 03 '26 06:07

Pablo Santa Cruz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!