Part 1 listed the steps required to create a mobile provisioning profile for your app. This part describes the steps required to create the application file (.IPA) and how to set up your webserver to host the distribution of the app.
There are 2 sections in the project options of your Delphi project that must be filled out in order for your app to be distributed ad-hoc. Firstly, let’s look at the Version info:
The CFBundleName and CFBundleIdentifier are the key fields here that need to be filled out, and CFBundleIdentifier must equal the application ID that you generated at the developer portal. In the Provisioning section, select All Configurations – iOS Device Platform. It won’t matter whether your app is a debug or release build, you’ll still need the same information here. Select a Build Type of iOS Device – Ad Hoc. You’ll note the items below it change for each build type:
The Distribution Certificate is the name of the certificate that was used to sign the provisioning profile for your app (please refer to part 1). The Mobile Provision File is the location of the provisioning profile you created in part 1. This is the path to the file on your Mac, not on your Windows machine (whether virtual or otherwise).
If you’ve filled out these parts correctly, you should now be able to create an ad-hoc build of your app. In the project manager, under Target Platforms, expand iOS Device, then Configuration and select Ad-hoc:
In the main menu, click Project, then Deploy. The name of this function is sort of confusing because it doesn’t actually deploy the application to your device. It does however, create the .IPA file necessary for distributing your app. By default, the .IPA file will be under your project directory, in the iOSDevice folder, in the Debug folder if you’re creating a debug build, or in the Release folder if you’re creating a release build.
To distribute your app, you’ll need a webserver; either one of your own, or one that is being hosted for you. There’s a couple of requirements that need to be met in order for this to work. Firstly, the webserver needs to have the correct MIME type configuration. This can be for the entire server, or for the instance that is your website, or even just the directory that your files will reside in. If you are doing this yourself, please check your webserver documentation as to how to alter the MIME type configuration. If your website is being hosted by someone else, they may have added these already. The required MIME types are:
application/octet-stream ipa text/xml plist
In order to configure the distribution files correctly, you will need to know the absolute path on your website to the files associated with your distribution, e.g. http://www.mydomain.com/myapp. The URL forms the basis for the details included in the distribution .plist file. This file is what the device looks at first to determine what it is actually downloading, and has references to the images that appears on the device when it starts the download/install process. I have included a template .plist file here: