Why not use development provisioning instead of ad hoc?
Asked Answered
M

3

50

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.

Matsuyama answered 12/4, 2010 at 22:2 Comment(0)
W
75

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 steps, 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. 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.

Wealthy answered 10/11, 2010 at 13:16 Comment(4)
Is it possible to test with Ad Hoc on the same device you have been using with the development profile? I believe I am doing everything correctly, but not getting alerts. I have a feeling it is because I authorized the alerts on the device using the development profile first.Foetid
I believe what you're saying in this answer is true, that Push Notifications are the main issue that distinguishes these, but if that's true, why does Apple's documentation repeatedly suggest the need for setting up distribution profiles for sharing among team members. All over their docs, it's implied that you need more than a developer profile to share with others, even though that doesn't seem to be the case. Did something change? See: developer.apple.com/library/ios/#technotes/tn2250/_index.html#//…Trstram
I have a question please read carefully. it's not mention in this question. Can I test push notification with an adhoc profile with development push notification for ssl?Olecranon
@hasan83 No. You have to use Production Certificate to test with Ad HocDemb
A
7

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)

Albur answered 12/4, 2010 at 22:6 Comment(7)
But I am able to install a development app without the developer certificate, so long as I have the development provisioning profile. Does the development provisioning profile include the developer's private key? Is that why this works?Matsuyama
Well that's interesting. Have to dig a little bit more to answer this.Albur
And, by the way, can you install developer build without Xcode at all?Albur
Yes; that's what my colleague did. He doesn't have Xcode installed.Matsuyama
You can send a development provisioning profile to random people, and they can use it to sync the app, provided their device's UDID is added to that provisioning profile.Wealthy
You can't debug application with AdHoc profile, but you can with developers. I think that is the main difference.Albur
i think itunes used to only install ad hoc apps, but they relaxed that restriction a while ago.Ideally
S
-1

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.

Sheehy answered 13/4, 2010 at 0:37 Comment(1)
You're not answering my actual question.Matsuyama

© 2022 - 2024 — McMap. All rights reserved.