PDA

View Full Version : Ad Hoc distribution. Can it be done without XCode?




jerrywickey
Jun 22, 2009, 01:03 PM
I want to test my app on a freind's iPhone. I have his iPhone's ID, a provisioning profile for his phone and could install it from XCode, but he doesn't have XCode and lives a hundred miles away. He has iTunes.

I already sent him the provisioning profile, but which app file do I send him?

myApplication.app found in build\distribuion-iphoneos turns out to be a directory, not a file.

Jerry



Luke Redpath
Jun 22, 2009, 01:17 PM
You need to send him the .app bundle - just zip it up first and send it over.

dejo
Jun 22, 2009, 01:37 PM
You want to follow the instructions in the Program Portal > Distribution > Prepare App, in particular steps 13 and 14. This will create the desired zip file.

jerrywickey
Jun 23, 2009, 10:07 AM
I tried several different things, including sending the zip.

Remember, he does not have XCode. If he did, it wouldn't be a problem. He is using iTunes to sync his iPhone. iTunes takes the provisioning file. It will not take the zip or any other file.

Is there somewhere special in iTunes he needs to place the zip file?

Jerry

dejo
Jun 23, 2009, 10:13 AM
Is there somewhere special in iTunes he needs to place the zip file?
According to the Program Portal:
Recipients of the application will need to drag the application file and Ad Hoc Distribution Provisioning Profile into iTunes, then sync their iPhone to iTunes to install.
Did you build your application with Xcode for distribution?

jnic
Jun 23, 2009, 10:16 AM
It needs unzipping before you drop it in iTunes.

jerrywickey
Jun 23, 2009, 11:34 AM
I did build it for distribution.


He did unzip it before dropping it in. He dropped every file which came out of the zip into iTunes and synced the iPhone, but the app did not appear.

It seems to me that their should be a single app binary file somewhere which contains the provisioning data specific to that iPhone, so that only that single file should be needed. But I didn't write the iPhone OS.


Any other ideas how he might be able to test my app?

Perhaps go through the steps you would use.

1) obtain his device 40 hex ID
2) obtain an ad hoc provisioning profile for the app and his phone
3) send via email to him the provisioning file names *.??? and the app file named *.??? found in the ???? directory
4) he drops both into iTunes and syncs his iPhone
5) he enjoys the app




By the way here are the portal's instructions for ad hoc distribution in their entirety

1) Create and Download an iPhone Distribution Certificate
2) Create and Download an Ad Hoc Distribution Provisioning Profile
3) Build your application with Xcode
4) Share your application file and the Ad Hoc Distribution Provisioning Profile with the owner of each device
5) Recipients of the application will need to drag the application file and Ad Hoc Distribution Provisioning Profile into iTunes, then sync their iPhone to iTunes to install

Are there more detailed instructions anywhere? If so, where?

Jerry

dejo
Jun 23, 2009, 12:12 PM
Are there more detailed instructions anywhere? If so, where?
Yes, there are more details in other parts of the portal. For example, "1) Create and Download an iPhone Distribution Certificate" has more instructions under Distribution > Obtaining your iPhone Distribution Certificate. Similar sections can be found within the portal for the other pieces, except for probably steps 4 and 5.

jerrywickey
Jun 23, 2009, 04:47 PM
Well, there ya' go. Steps 4 and 5 are with what I need help.

4) Share your application file and the Ad Hoc Distribution Provisioning Profile with the owner of each device
5) Recipients of the application will need to drag the application file and Ad Hoc Distribution Provisioning Profile into iTunes, then sync their iPhone to iTunes to install

What application file. zip goes to iStore distribution and presumably also to ad hoc distribution, but the iTunes app makes no provisions for it. Unless there is a undocumented directory in which to place the zip.

Does anyone know which file and in what directory XCode may have placed it?

Jerry

Luke Redpath
Jun 23, 2009, 08:05 PM
YourApp.app *is* the application. It will show up as a folder as in Windows as that's essentially what it is and Windows knows nothing about .app packages - look at all of your Mac apps in Finder > Applications - all .app, all folders. You can right click on any of them and select "Show Package Contents".

If the recipient is on a mac just right click on the .app bundle and select "Compress" and send them the zip. They unzip and drag the .app bundle to iTunes. If they are on Windows, the "Compress" option might not work, see this article:

http://www.markj.net/iphone-ad-hoc-distribution-windows-mac/

If you look inside the .app bundle you will find an actual compiled binary in there but that alone is not the whole app.

jerrywickey
Jun 25, 2009, 06:29 AM
Thanks for the link. That might be helpful. but it really just says the whole ad hoc process is a bitch.


So what my friend on whose iPhone this will be installed needs to drop the app.zip into iTunes and sync his iPhone?

He has already tried that. That is the first thing we tried.

He is using iTunes on a windows machine.

Just what should he be doing instead?

Example
He should drop the provisioning profile into iTunes
Drop the ????? zip or each file ????? into iTunes
Sync his iPhone

It must be different than this because this is exactly what didn't work.

Jerry

jnic
Jun 25, 2009, 06:42 AM
The following steps work for me:

1. Xcode settings: Device, Release.
2. Build.
3. Products > Your.app > Reveal in Finder.
4. Right click, compress.
5. Send, along with the PP with which you built the app.

At the other end:

1. Extract Your.app from Your.app.zip.
2. Drag & drop Your.app into the "Library" section of iTunes.
3. Likewise the PP.
4. Attach device, tick Your.app in Applications tab.
5. Hit "sync".

Luke Redpath
Jun 25, 2009, 09:25 AM
Thanks for the link. That might be helpful. but it really just says the whole ad hoc process is a bitch.


So what my friend on whose iPhone this will be installed needs to drop the app.zip into iTunes and sync his iPhone?

He has already tried that. That is the first thing we tried.

He is using iTunes on a windows machine.

Just what should he be doing instead?

Example
He should drop the provisioning profile into iTunes
Drop the ????? zip or each file ????? into iTunes
Sync his iPhone

It must be different than this because this is exactly what didn't work.

Jerry

I don't think I could have been much clearer, but your friend must unzip the package first, and drop YourApp.app onto iTunes.

firewood
Jun 25, 2009, 10:56 AM
Used to be that if you zipped up the app bundle up inside a Payload directory and renamed the resulting .zip to an .ipa, you could drop this zip file on top of iTunes in Windows (after the matching PP).

Does this still work?

And if not, what changed? (Maybe using the compress command from the Finder, or ditto, to create the zip?)

iPhoneczar
Jun 27, 2009, 10:53 PM
I just figured out the "trick" on iTunes. I had a good app.zip and profile.zip on my beta distribution server (from which I download them to each PC with the browser) and they worked fine on a Mac. On Windows you do indeed seemingly need to EXTRACT the files from the zip. On the MAC you can simply drag and drop them in zipped form. The TRICK on Windows was in where to DROP the EXTRACTED files in iTunes to get them to "take." I kept getting the circle/bar "can't drop here" mouse pointer UNTIL I hovered over the Library section on the left menu section. I didn't have an Applications item in the Library section because on this particular machine there were no Apps. My Ad Hoc app was the first. It's confusing because if you try to drop anywhere else you get the "no drop" icon.

I think it might be easier to just go to the App Store in iTunes and download a free app just to create this window in the library then open the window and drag and drop to it.

There are a lot of places in the Windows world where you can swerve into a ditch with this process.

Hope this little bit extra helps.

Oh yes. My Macbook is running the latest update of Leopard and my test PC is running Windows XP.