Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create two iOS Apps in Xcode

Using Xcode (to develop on iOS) I want to create a second project that it is the same as a first project but some classes are differents.

Exactly, I'm creating an IPhone App and I want to offer a free version and a premium version. Actually, the code of the projects are identical but changes some classes.

The problem is I don't want support two projects. If I modify a class, then I have to modify the same change on the other project. It is very redundant.

Besides, the project are pushed to a remote GIT respository.

And one last note, an iOS App is identify using an ID associated with the project.

So, I need two differents projects?

Which is the best solution to create two iOS App projects in Xcode sharing the classes, but changing two o three classes?

Thanks

like image 279
jlmg5564 Avatar asked Apr 15 '13 16:04

jlmg5564


People also ask

Can I have 2 apps the same on Iphone?

Tap and hold on the app, then drag it to the left edge of the screen and drop it onto a Home Screen. Repeat this process as many times as you like to create as many duplicates as you need.

Can you make iOS apps with Xcode?

Xcode is Apple's IDE (Integrated Development Environment) for both Mac and iOS apps. Xcode is the graphical interface you'll use to write iOS apps. Xcode includes the iOS SDK, tools, compilers, and frameworks you need specifically to design, develop, write code, and debug an app for iOS.


2 Answers

I want to offer a free version and a premium version.

In this case, you do not need to create two apps in two projects: all you need is a second target for your premium version. Here is a link that explains how to create and manage multiple targets in Xcode.

The process boils down to adding a target to the project, defining a separate properties plist for it, optionally setting up a preprocessor symbol for conditional compile, and using that symbol to #ifdef portions of your classes not needed in the free version.

Another common approach to managing free vs. premium offering is to provide a single version for free, and let users upgrade it to premium through an in-app purchase.

like image 146
Sergey Kalinichenko Avatar answered Sep 23 '22 03:09

Sergey Kalinichenko


You just have to create two targets. So you'll only modify a single code base, perfect!

This tutorial will walk you through (and even uses lite/paid versions as it's example).

like image 26
Tom Redman Avatar answered Sep 22 '22 03:09

Tom Redman