Building for Distribution

From $1
Table of contents

The process of building for distribution in MonoDevelop largely mimics Xcode, in order to make it possible to follow Apple's instructions for building for distributing.

Note that you can also export your project to Xcode using the Run->Debug in Xcode command, and follow Apple's instructions for code signing for distribution in Xcode.

Building for the App Store

1. Add a new configuration for your distribution build.

You need to add a new configuration to MonoDevelop for distribution.   This needs to be done first at your Solution level, and then also for each project part of the solution that you will distribute.

Select Project->Solution Options from the menu to get the Solution options dialog box.   Select the Configurations panel and click the "Add" button.  In the New Configuration dialog pick a name for the configuration, such as "Distribution", and make sure that the Platform field is set to "iPhone".

Now do this for each one of your projects in your solution: Open the Project Options dialog. If your project is called "Foo", this is done using the menu Project->Foo Options. Select the Configurations panel and click the "Add" button. In the New Configuration dialog pick a name for the configuration, such as "Distribution", and make sure that the Platform field is set to "iPhone".

dist-create-configuration.png 

2. Change the Signing Options for the Configuration.

In the Project Options dialog, select the "iPhone Bundle Signing" panel, and using the dropdowns at the top of the panel, select the configuration for which you wish to edit signing settings. This should be the configuration you created in your previous step, in this case "Distribution".

Identity: Pick an identity for signing your application. This should be the Distribution identity that you obtained from Apple's iPhone Developer portal when you created your distribution certificate. Pick  "Distribution (Automatic)" if you want MonoDevelop to select the correct identity automatically.

Provisioning Profile: Pick the distribution provisioning profile that you have created for your application that you obtained from Apple's iPhone Developer portal. MonoDevelop only lists the provisioning profiles that are associated with the identity you have selected.

dist-signing.png 

You can also set up custom entitlements and resources rules in this panel, but they are not necessary for most users, and if you need to pass special command line arguments to the codesign tool you can specify those here.

 

3. Review Bundle Settings

Select the "iPhone Application" pane and review your application bundle settings. Ensure that you have set a display name and version number, and that the bundle identifier matches the bundle identifier that is part of the provisioning profile. For App Store apps, you should also have a 57x57 png icon.

dist-app-settings.png 

 

4. Build the Project

Switch your active build configuration to your new profile.

dist-select-config.png 

 Then build the project. You can then find the build bundle by going to the project folder,

dist-open-folder.png 

 and navigating to the bin/Distribution/iPhone directory. Zip the app bundle, and submit it to Apple.

Building for Ad-Hoc Distribution

Building for ad-hoc distribution is largely the same as building for the App store, but there are a few differences. You may wish to create project configurations for the App Store and for Ad-Hoc, so that you can build with either set of settings.

NOTE: The following steps only apply to older versions of MonoDevelop. Current versions use the entitlements from the provisioning profile, so no additional steps are necessary.

After creating your configuration for Ad-Hoc distribution, add a new Entitlements.plist file to your project.

dist-create-entitlements.png 

Disable the get-tasks-allow entitlement. This prevents the debugger from attaching to your application, which is required for Ad-Hoc distribution.

dist-disable-gettaskallow.png 

Add this file to the "Custom entitlements" field in the code signing options, for the Ad-Hoc distribution configuration only.

dist-entitlements-settings.png 

When you build the app bundle with these settings, it can be distributed as an ad-hoc application.

Tag page

Files (0)

 
Page last modified 19:56, 8 Jun 2010 by MichaelHutchinson