Showing posts with label Distribution. Show all posts
Showing posts with label Distribution. Show all posts

Tuesday, April 29, 2014

Creating multiple apps 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 "autocreate schemes" option. By unchecking this option, you can assign a proper scheme name.

3. Click on the project Targets. Two finger click on the "taget 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:

 
     #ifdef IS_PREMIUM_VERSION
         lbl.text = @"this is premium Verison";
     #else
         lbl.text = @"this is Light version";
     #endif

Monday, September 17, 2012

How to install the certifcates?

To distribute iOS app, you need all the necessary certificates generated by the iOS Provisional Portal. You will have a login ID and password after you have registered successfully with Apple.

To start the distribution or testing the app in any iOS devices, you need this:
  1. provisioning certificate - this can be generated automatically by xCode.
  2. app ID - this can be generated automatically by xCode.
  3. distribution certificate - you need to manually do it.
The easiest way to generate the provisioning certificate is through your xCode 4.2 IDE. Run xCode and open any project. Click on the "Organizer" button located at the top right corner and you will get the following screen. Right click on Developer Profile and follow the options as shown below.


In the iOS Provision Portal, ensure that you have created the Development certificate and also the Distribution under Certificates section.



For the App IDs, it supports wildcard characters. So, it's upto you whether you want to create a new App ID or continue with the one that was generated by the xCode.

In the Provisioning section, you will see Development and Distribution as well. For the Development provisioning, the xCode will handle it. For the Distribution provisioning, you will have to generate it manually (after you have visited Certificates \ Distribution option as highlighted in the above).

Another thing is to import the certificates that you have downloaded from the portal (in case you want to create the certificate with your preferred name). Below is the steps to call out the Keychain program to install the certificates into your computer:


This is the Keychain program:

If you double click the certificate in the Finder, you will receive a warning because those certificate requires admin permission to get install. The proper way to do this is run the Keychain program, select File \ Import Items. Then, choose the certificate that you want to import. You need to key in your user name and password so that it can be installed.

Please take note that once you have installed the certificate manually, the xCode will pick it up automatically (but, you might have to refresh the list by selecting different node).

As for the "xxx.mobileprovision" certificate, you may double click on it and it will get install into xCode. Since there is no changes in the system, there will be no prompt for the admin password.