Distributing iPhone Apps Using OTA Does Not Work

by Stephen Dewitsky posted on February 25 2011 13:02

So the best kept secret of iPhone OS 4.0 is slowly becoming a well known and most useful process. Wireless Distribution or Over the Air (OTA) Distribution model can be officially referenced via Distributing Enterprise Apps for iOS 4 Devices. This new model removes the overhead of educating a client, or application tester, on the nuances of installing an Ad Hoc Distribution. Provisioning files and application build are bundled together in an .ipa, or iPhone Application Archive, which can be installed on device with or without iTunes. Installing through iTunes is as simple as Drag n Drop, then Sync. Installing OTA is as simple as tapping a link from the web browser.

The setup process, however, is still bestowed on the development team. Checkout the guidelines on Apple's reference page: Distributing Enterprise Apps for iOS 4 Devices, or some nicely packaged tutorials; such as Distribute Ad Hoc Applications Over the Air (OTA). I will relinquish the details of how to accomplish the distribution to the reference guide and focus on what to do when the iPhone OTA distribution does not work.

When attempting to configure the iPhone Wireless Distribution I encountered 3 hurdles on my way to success.

  1. Problem: After executing Build and Archive, Organizer does not automatically open

    Solution: Make sure your application identifier matches the id linked to your Ad Hoc provision file

    This may not be a pertinent step to a successful distribution, but I include here because the behavior of XCode was affected. Each Ad Hoc build is configured to use an Ad Hoc provision file which in turn is linked to an Application Identifier configured in the program portal. These identifiers are usually reverse domain in the form of "com.yourcompany.*". When creating a new XCode project, the default application id is something like "com.yourcompany.${PRODUCT_NAME:rfc1034identifier}". Modify the identifier to match the configuration set in your program portal. After the "Build and Archive" process completes, Organizer should open automatically with your new "Archived Application" listed below.

  2. Problem: Download Application link does not work

    Solution: Make sure your web server has the correct MIME type set for both .plist and .ipa files

    Property List (.plist) and iPhone Application Archive (.ipa) files are served to the iPhone OS devices from your web server. Most web servers, in my case IIS, do not have a MIME type mapping for these file types. When tapping the "download application" link from the HTML page, the page did not initiate a download. The download does not work. It just sat there as if I did not tap at all. In IIS, when the MIME type is not recognized the web server delivers a 404 Page not Found error. The download will not start because the web server thinks the file does not exist, even though we know it does. Since the "download application link" uses the itms-services protocol, the server error does not get relayed to the user interface. Adding the MIME type to the web server's list corrects this problem and can be verified using a web browser. The MIME types for these files are:

    .plist - text/xml
    .ipa - application/octet-stream

  3. Problem: Download Application link still does not work

    Solution: Remove any spaces from your absolute URL's file name and web folder structure

    I beat my head against the wall on this for a while. It seems logical that a project file or web folder could have spaces in the name since we have a function of URL Encoding, but URL Encoded resources appeared to be the make it or break your head on the wall factor. I had %20 URL Encoded spaces in my web folder hosting the .ipa and .plist files and also had spaces in the file names. Removing the spaces made that "download application link" WORK. I can't explain it nor did I submit a bug report. Could be by design or an oversight. Just check it out for your own sanity.

Having an OTA distribution for iPhone work for you is a great relief on your application workflow. You can now send your testers an email with a link to a web page which holds the capabilities necessary to install your latest version of an iPhone app. As of today, I was successfully able to implement the iPhone OTA distribution using a regular iOS Developer Program account. I bring up this fact because Apple's reference document Distributing Enterprise Apps for iOS 4 Devices clearly states that this model is intended for usage with the iOS Enterprise Program and that the first step in "The process for deploying an in-house apps is: Register for the iOS Developer Enterprise Program with Apple". We all hate to have our heart broken. I just want you to be prepared for a day when the mercy of Apple may not be so kind and the privilege of using wireless distributions with iOS Developer accounts could be revoked without any notice.

Tags: , , , , ,

iPhone | OTA | Provision | Wireless Distribution | XCode

Error Starting Executable No provisioned iPhone OS device is connected

by Stephen Dewitsky posted on December 6 2010 12:01

Well, here we are again.  Everything looks good but nothing acts right.  We just plugged the iPhone or iPod into the USB port and press "Build and Debug", expecting to test the latest changes of our app on a device.  However the effort comes to a screeching halt with a notice from XCode stating:

Error Starting Executable
No provisioned iPhone OS device is connected

 

 

What am I missing?

Step A. Plug USB cable into iPhone
Number 2. Plug USB cable into XCode
And Third. Press "Build and Debug"

OOps, I forgot to wave the magic iWand and recite the iTunes license agreement....backwards. 

Speaking of iTunes, I just finished the "Download and Upgrade" process to the latest iOS.  Let's think about this.  If I upgrade my device to the latest iOS, that usually means XCode needs an upgrade.  Since the version of XCode installed on my computer is now somewhat out of date, it does not recognize the fancy new iOS projecting through the USB port.  The same may be true for you.  Take the time and 3.5 gigs to make sure the version of XCode installed on your machine supports the iOS version installed on your device.

Not to mention the error specifically states "No provisioned iPhone OS device is connected".  Let's break it down and debug:

No provisioned - tells us to check the provision file for our device id and ensure this file is selected for the app build
iPhone OS - tells us to check if the operating system version is supported by XCode
device is connected - tells us to plug it in

That is all I can suggest.  Remember, if all else fails, restart the system.....if that does not work, hit it with a hammer.

Tags: , ,

iPhone | Provision | XCode

Contact Us

We want to hear from you.  Our community is important to us and we want to make sure we give you the contact you want.  Please contact our team if you want to sent us feedback of any kind.  Enjoy reading!

RecentComments

Comment RSS