Why not use development provisioning instead of ad hoc?

IphoneApple Push-NotificationsProvisioning ProfileIos Provisioning

Iphone Problem Overview


I was under the impression that when you use a development provisioning profile for a build of an app, only the specified developers can deploy that build to a phone.

But I just deployed a build that uses a development profile to a phone using Xcode Organizer, even though I'm not one of the valid developers for that profile. One of my colleagues, who doesn't even have Xcode installed, did the same with his phone using iTunes.

In that case, why not use a development provisioning profile for distributing your app to e.g. your QA team, instead of ad hoc distribution?

EDIT: Please read the part in bold carefully before answering. I'm not asking a basic "how does this work" question. I've made a lot of development, ad hoc, and app store builds, and now I find that I seem to have made some wrong assumptions.

Iphone Solutions


Solution 1 - Iphone

There's one situation in which you need an Ad Hoc profile, and that's when you want to test Push Notifications.

If you test Push Notifications on a Development Provisioning Profile, your push notifications need to be sent using the Development Push Notification Certificate for your SSL connections to Apple's sandbox APNS server.

If you want to test Push Notifications using your Production Push Notification Certificate and the live APNS servers, you'll have to deploy your app to a device using a Distribution Certificate and Ad Hoc Provisioning Profile (which includes doing the Entitlement.plist retardedness which you can ordinarily skip if you were only using Developer Provisioning Profiles).

Also note that when you deploy using an Ad Hoc profile, your device token will be different from the one you use when you're using the development profile. Also this the recommended way to test APN because there's no back end changes that need to be made between the Ad Hoc build and the final live deployment on the AppStore.

Solution 2 - Iphone

Ad-Hoc is not for developers, but for testers. Who do not have iPhone SDK / XCode, iTunes only.

(The answer is: you can install ad-hoc app without developer certificate, and can't do it with development app)

Solution 3 - Iphone

Method 1: Install from XCode

The Development Provisioning Profile requires you to run the app (initially) from within XCode.

This has the side-effect of marking the device as being used for development, but also requires you to connect the iPhone/iPod Touch to the machine running XCode. Once you run the app from XCode, the app is installed on the device and you no longer need to be connected to the machine to run it. (Until you want to update the app.)

Method 2: Install from iTunes

An Ad-Hoc provisioning profile allows you to give the app to anyone and let them install it themselves using iTunes. You send them:

  • the app, and
  • the Ad-Hoc Provisioning Profile

They select these two and drag them onto iTunes. Then sync.

Later, you can give them an updated version of the app only (without the Ad-Hoc Provisioning Profile, since they've already installed that on their device) and they can drag the new app onto the iTunes icon to install the new version.

One limitation to Ad-Hoc distribution, is that it requires you to enter each Device ID into the iPhone Development Portal. And there is a limit to 100 device IDs per year (you cannot erase any IDs, until your next year begins -- only add them). The 100-ID limit will not be a hindrance for most developers, just keep in mind that you need to get the device ID ahead of time, before you create the Ad-Hoc Provisioning Profile to send to the person you want to install your app.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionlawrenceView Question on Stackoverflow
Solution 1 - IphoneAsad R.View Answer on Stackoverflow
Solution 2 - IphonebealexView Answer on Stackoverflow
Solution 3 - IphoneRubskiView Answer on Stackoverflow