32

I would like to deploy an app to 20 iOS devices (iPhones and iPads) using Apple Ad-Hoc Deployment. I need to push out the application from a particular computer. Some of the devices that I will be using might have already been synced to computers.

I'm guessing that once I sync these devices to the computer I'll be using to deploy the app from, the content on each device that has previously been synced to a computer will be wiped. Is that correct? Is there a way around that?

pjs
  • 18,696
  • 4
  • 27
  • 56
xited
  • 877
  • 1
  • 10
  • 19

2 Answers2

48

If you don't want to use testflight, here is another over-the-air solution:

  1. In your xcode project go to Product > Archive

  2. Click Distribute in the xcode organizer window that appears when the operation is complete

  3. Click Save for Enterprise or Ad Hoc Deployment and choose next

  4. Choose your ad hoc provisioning profile (created in the member center at developer.apple.com. Make sure it has all 20 device uuids included on the profile.

  5. Click Export

  6. Save it. Make sure to click on the Save for enterprise distribution checkbox and fill out the required info. Application URL will be the URL starting with http:// or https:// that will go to your files (see next step)

  7. This will save two files yourFilename.ipa and yourFileName.plist. Copy these files to your webserver.

  8. Now for the magic. You need to make a link somewhere with the URL itms-services://?action=download-manifest&url=http://yourwebserver.com/path/to/yourFileName.plist

  9. Assuming all your links work and your provisioning profiles are correct, the app should start installing on any registered device that clicks on that link.

If you don't want over the air downloads, you can distribute that .ipa file that was generated in step 6 to your 20 people (their devices must be registered on the provisioning profile still). They can open that file in iTunes and then sync your app with their devices.

Installation of an application over the air or by syncing with iTunes will not wipe the content of any devices.

Andrew
  • 15,357
  • 6
  • 66
  • 101
  • 1
    That's interesting. I did everything you suggested and I am getting the following error message: "Unable to Download Application" "myApp" could not be installed at this time. any ideas? – xited Sep 29 '13 at 20:34
  • @xited Does it show a loading thing? If it loads partly and then says that then that means your provisioning profiles are messed up. If it immediately says that message, then that means that one of your links is messed up – Andrew Sep 29 '13 at 20:48
  • It's loading ~80% and then it displays the message. – xited Sep 29 '13 at 20:52
  • 2
    @xited Okay that means that your provisioning profile does not include the device that your are trying to install it on. – Andrew Sep 29 '13 at 20:53
  • @xited Is your device uuid registered at developer.apple.com? Did you add that device to the provisioning profile that you selected in step 4? If both of those are true - then make sure that in Project Settings -> Build Settings -> Code Signing that under "Release" you have "ios distribution" selected. – Andrew Sep 29 '13 at 20:56
  • can I use a wildcard app id to create the distribution profile? – xited Oct 06 '13 at 01:18
  • @xited Maybe. Im not sure – Andrew Oct 06 '13 at 01:31
  • @xited I don't use a wildcard one. – Andrew Oct 06 '13 at 01:31
  • I have application URL point to a directory. Should it point to a page? – xited Oct 06 '13 at 01:50
  • @xited Application url should point to the .ipa file that you put on your webserver. – Andrew Oct 06 '13 at 02:06
  • So my problem was the code signing. Once I signed it with my own iOS distribution profile (in Release), archived it, generated the ipa, and uploaded it to my web-server according to your guidelines it all worked. One thing I'd like to point out is that it took a long time to download, since my web-server is slow. In this case the app will display "Waiting..." for a long time and no progress in the bar. You'll then see "Installing.." for a second or two and then it will be ready for use. Thanks a lot! – xited Oct 06 '13 at 14:36
11

@Santa Claus answer is still valid in 2020. This is a good option to install app to selected devices when you don't want to use testflight for example bacause of 90 days limit.

Couple of things to point:

  • The process order is a little bit different
  • When you press Distribute App in xcode Archive/Organizer and select Ad Hoc (or Enterprise) and press next: You have to check the box include manifest for over-the-air installation (App Thinning can be None)
  • (6.) in Distribution manifest information: You have to give the urls where you place your file for download. I noticed that the url seems to be case-sensitive so if your app is Foo make sure to put the url like https://www.example.com/apps/Foo.ipa
  • Don't forget to use provisioning profile that have the UUIDs of the devices you want to install the app (can be done Certificates, Identifiers & Profiles in https://developer.apple.com)
  • (7.) You will get package of files. You will need yourFilename.ipa and manifest.plist
  • (8.) Use the manifest.plist in the url, I created a dummy web page where I placed this kind of button (Same place should have the *.ipa file) <a class="btn-download" href="itms-services://?action=download-manifest&url=https://www.example.com/path/manifest.plist">Download</a>

If you don't get error when clicking the download with safari browser in the selected device (UUID match) it will install the app. (Might not give any feedback of success but the icon is found on desktop and the app can be launched)

SinunHenkka
  • 445
  • 6
  • 14
  • Is there a max number of profiles that can be added to an Ad Hoc provisioning profile? I need to distribute and app internally to around 400-500 devices – teh_raab Oct 22 '20 at 15:22
  • 1
    @teh_raab you are limited to 100 of each device type - so 100 phones, 100 iPads, 100 watches etc – Andy P Nov 03 '20 at 14:57
  • 1
    Just noticed that this will stop working also after the provisioning profile's certificate is expired (valid 365 days after creation). I had to create new certificate after expiration and do the procedure again. – SinunHenkka Apr 27 '21 at 07:53