» Ad Hoc distribution of an iPhone application
Ad Hoc distribution of an iPhone application
We're preparing a big new release at Goojet, and wanted to collect some feedback from some of our users. For iPhone applications, Apple allows "ad-hoc" installation of an application on up to 100 devices, without going through the AppStore and its painful validation process.
Reading the documentation, this sounds easy: just create an ad-hoc provisioning profile where all test devices are listed, sign your application with this profile and off you go. Alas, there is a tiny but absolutely mandatory step that isn't described in the docs, and I banged my head for hours before finally finding it...
iTunes refused to install the ad-hoc application, saying that it cannot be verified. Inspecting the iPhone's log shows "entitlement 'get-task-allow' has value not permitted by provisioning profile". This entitlement thing is mentioned only once in the whole documentation, in a place totally unrelated to ad-hoc installation and it barely explains what it is useful for.
So, here is what you have to do: in XCode, select File/New, and then in the "Code Signing" section you'll find an "Entitlements" template. Create an "Entitlements.plist" file, open it and uncheck the "get-task-allow" property. In the project's ad-hoc build configuration (that you should have created to sign with the ad-hoc profile), set the "Code Signing Entitlements" to "Entitlements.plist" you just created.
Build your application, done, you can deploy!
What is this property useful for? Apparently, unchecking it states that the application cannot be debugged. But why is it needed, and why in hell isn't this taken care of automatically when using an ad-hoc provisioning profile?
Some additional tricks for a nice packaging for your testers: use a different application ID and change the bundle ID in Info.plist accordingly, so that the new application can be installed besides the regular one instead or replacing it. Also set a different name and icon so that both version can be easily distinguished on the device.
And for a step-by-step explanation for your testers, checkout these nice how-to's: Finding your iPhone's unique identifier, and Installing an ad-hoc distributionn.

Did you check in the dev portal when having problems building for Ad Hoc?
Check here... http://developer.apple.com/iphone/manage/distribution/index.action
Read Steps 8 - 12 of the "Building your Application with Xcode for Distribution" section..
I learned the hard way also :-)
The portal actually has some good instructions on certain things.....CERTAIN things!!
Doh! The precious information that took me hours to find is written there! Now why oh why is it in "Building your Application with Xcode for Distribution" and not "Creating and Downloading a Distribution Provisioning Profile for Ad Hoc Distribution"?
Sure it's about building and distribution more than about provisioning profiles, but one would expect to find ad-hoc related problems in an ad-hoc related section of the documentation. And it also doesn't appear in the search.
Anyway... Thanks for the pointer ;-)
Thanx,
even if it is on the program portal your explanation is straight forward and helped a lot!!
Thanks.... I had a similar problem, and this post helped me out tons! Thanks a bunch!
Thanks for the useful article! I have tried to do it by myself but it was a real pain and I have thrown everything down. I am a junior mobile application developer by myself so this thing was very useful for me. Thanks one more time and I will be waiting for another great posts from you.
Sincerely,
Adam Wanson
Yes, thanks for posting this. I ran into the same issue and had to get to the point of diffing the development and distribution profiles I downloaded from the portal to see what was different. After I noticed that get-task-allow was "false" in the distribution one then the error message I was getting suddenly made sense. I would have expected this setting to be loaded from the provisioning profile too and not from some random default plist file.
Even if there's a document on the portal describing this issue, there should be material on it in the iPhone Development Guide especially under "Publishing Applications for Testing"!
The Link http://developer.apple.com/iphone/manage/distribution/index.action seems to be broken...
It works for me, but you have to be logged in with your iPhone developer account.
Thanks! it helps!
thanks for your lesson, we fallow your steps then success.
Is there a way to distribute the adhoc'e d file via air directly to a registered for developing device?
thank you!
Yes, you just have to send the application and the ad hoc provisioning profile. The user can then install the application on their device by drag and dropping these files on their iTunes library.
In the project's ad-hoc build configuration (that you should have created to sign with the ad-hoc profile)...
Good article BUT impossible to follow since the key step is not described
:(
This article is about a missing step in Apple's documentation which is linked in the article. So please refer to them to setup the project's build configuration.
Also note that this article is now about 3 years old and things have change quite a lot regarding ad hoc deployments. Here again, you'd better check the latest revision of Apple's doc and see if this step is still missing or not.