Wednesday, February 03, 2010

Modifying add hoc users

If you add users to your original beta you will want to know this. From the iPhone developer page, go to the following:
Provisioning -> Distribution
Edit -> Modify (assuming you have one, or make one at this point)
Select your new people (I name this with the beta they are in as part of their name for reference)
You will need to download this file (it should say pending right now).

Note: Don't do like me and go to another page for a second and then come back and forget to click the "distribution" tab and end up downloading my development certificate again and wondering what the heck was going on.

Now follow the directions below. Good luck!


This is a GREAT write up on doing add hoc and I did a direct Cut and Paste from the blog at JohhnyWorks:

"One more thing that caught me over and over again: don’t forget to increment the version number in your info.plist file before giving Ad Hoc users a new copy! iTunes is really sneaky about what happens here…in both cases it says the application is already installed, and asks if you want to replace it, but if you try to replace with the same or lower version number, it won’t actually do anything.

If you are getting

Application was not installed on the iPhone because it could not be verified.

then your profile isn’t valid and you should check out this post. This biggest thing to remember is

  1. Delete all the profiles stored in ~/Library/MobileDevice/Provisioning Profile.
  2. Double click your .mobileprovision file and it will get loaded into XCode - There is a chance that it will get loaded by another application. If that is the case, right-click it and open it with xcode.
  3. Quit XCode completely. I’m not sure why this is necessary, but often XCode refuses to build unless it starts up with the profile already ready.

Lastly, ensure not only that Entitlements.plist is included in your project (click File, New File, Code Signing, Entitlements), and that get-task-allow is unchecked, but in your “Ad Hoc” build profile (Project, Edit Active Target) expand the list to “All Settings” make sure the “Code Signing Entitlements” field is filled out with your “Entitlements.plist”."

Monday, February 01, 2010

Add Hoc distribution for iPhone App

Now to create the bundle to give to people and install in iTunes.

Get your .app file that was created. Be sure you have all debugging turned off and not spitting out any junk you used for testing, etc. I also changed the version number of the application in the .plist file for the app and on the info screen so people would know it's beta and not get confused or something later.

For people to install the application they need two files. For a Mac, they just need the .app file and the .mobileprovision file. That said, I'm creating the Windows version for everyone for two reasons. I only have to distribute one package, and two I can put the icon in iTunes with the Windows method and I can't figure out how to do that with the Mac method. So, here is the Windows Method. There are lots of version of this on the web and this is what works for me.

This is a very informative post:

Now for the distribution files.

  • Create a directory for your distribution, we'll call it myApp
  • Create a folder in that folder called myApp/Payload
  • Put a copy of in Payload
  • Put a copy of the file you want displayed in Itunes in the myApp folder
  • This file should be called iTunesArtwork, no extension (I used a PNG, the same one as my apps icon)
  • Create a .ipa file using the following: zip -r myAppBeta.ipa Payload
  • Add the artwork to the .ipa file: zip -r myAppBeta.ipa iTunesArtwork

You're done. Now send everyone in the beta test the myAppBeta.ipa file, and the myApp.mobileprovision file. All they need to do is drag both files into iTunes and sync their phone. You probably should try it first before sending it out. :)

iPhone app, ready for Beta

My app is finally in a condition that I feel it's safe to give to people so they can beta test it and find the real problems. :) I was having an issue with Build-Run once I had added my new signature file, etc. Here is the error: The executable was signed with invalid entitlements
I was also getting an error when trying to install it via iTunes that the phone was not entitled to run the application.

This is the information from StackOverflow with some minor changes:

For Ad Hoc Distribution, complete the following:

  • In the File Menu, select New File -> iPhone OS -> Code Signing -> Entitlements. Name the file “Entitlements.plist" and click ‘Finish’. This creates a copy of the default entitlements file within the project.
  • Select the new Entitlments.plist file and uncheck the “get-task-allow” property. Save the Entitlements.plist file.
  • Select the Target and open the Project -> Edit Project Settings -> Build settings inspector. In the ‘Code Signing Entitlements’ build setting, type in the filename of the new Entitlements.plist file including the extension. There is no need to specify a path unless you have put the Entitlements.plist file somewhere other than the top level of the project