Tuesday, 6 May 2014

Create Multiple App's from One Project

If you are planning to publishing multiple apps from one project (for example, light version and premium version), this will be the article that can help you out.

1. Click Manage Scheme.

2. Untick the "auto create schemes" option. By unchecking this option, you can assign a proper scheme name.

3. Click on the project Targets. Two finger click on the "target item" that you want to duplicate.

4. A new plist file will be added to the project. Rename the plist file to whatever you want. In our case, we use "premium version". Do the same for the "Bundle display name" and also "Bundle identifier".

            Note: you need two app ID. One for the light version and another for premium version.

5. Goto the project targets again. Rename the target to "premium". In Build Settings, search for "Product name" and update it as well.

6. Search "plist" in Build Settings and change it to the appropriate plist file name.

7. Click on the "scheme" and choose New Scheme.

8. Choose the "premium" from the target and then key in "premium" as the scheme name.

9. The final step will be setup the preprocessor macros. You need to edit both Debug and the Release.

  • For premium version, add "IS_PREMIUM_VERSION".
  • For light version, add "IS_LIGHT_VERSION"

10. In the coding, you have to do this:

         lbl.text = @"this is premium Verison";
         lbl.text = @"this is Light version";

No comments:

Post a Comment