40

I saw this Chinese company offering a demo for their app/service which is a .ipa file. You can simply visit a link by your iPhone via Safari and you can install the demo .ipa file.

The link is right under the iphone app download button.

This makes me wonder what stops people from distributing their app this way outside the Apple app store. A legal issue, but technical can-do?

And I am also wondering what the provisioning profile they have used is, to generate this .ipa file from Xcode with such broad capacity of installation. As far as Ad Hoc distribution profile goes, it allows only 100 users, still correct? Is this some other provisioning profile I don't know about? My best guess is that this is a normal enterprice installation and they just make it for everyone in the world... can they?

I have tried the demo on my iPhone 4 and it works fine. The left button on the login page is register. The right button is login. Try register with a name (make name unique) and password, as long as you can get a success message back. You can log in.

ricardopereira
  • 11,118
  • 5
  • 63
  • 81
Hao
  • 6,291
  • 9
  • 39
  • 88
  • I'm voting to close this question because questions about [iTunes App Store policies are off-topic on Stack Overflow](//meta.stackoverflow.com/q/272165). – Machavity Sep 27 '22 at 12:28

3 Answers3

56

Well, you're talking about OTA (over-the-air) ADHOC or ENTERPRISE distribution. I've been doing that for years for my beta testers.

You don't require any Enterprise Program to do that although now with Xcode 6 is a bit harder to do because after you archive your project for distribution, the ADHOC distribution doesn't create the necessary plist file anymore.

I don't know how the Enterprise program works in terms of the devices you can install the app to (if it is required to register the UDID for each device in your Developer Portal or not) but if you need to deploy your test app to your testers which have their devices registered in the Devices tab in your Developer Portal you can use what I've explained below.

So, how do you that? I'll explain in steps:

Please Note: it is required that you use an encrypted SSL connection on the server you're uploading the IPA and Plist files (or at least only for the Plist file - there's a workaround if you don't have an SSL connection on your server, see below).

1. In your developer portal generate an ADHOC Distribution Provisioning Profile for your App ID. Also select the devices that can install your distribution. Only those devices can install the app.

2. In Xcode go to Preferences > Accounts > Your Account > View Details > Refresh.

3. In Xcode go to your Project > Targets > Your target > Code Signing > Select the correct Provisioning Profile for ADHOC Distribution for your build schema.

4. Clean your project.

5. Select your device as the build device even if it's not connected to your computer and build your project to be sure no errors are occurring.

6. With your device selected, Archive your project.

7. In Xcode's Organizer select Export > Save for ADHOC Deployment > Select your account and be sure that your archive is using the correct Provisioning Profile (if you're not seeing the whole name, hold your mouse cursor over the clipped text for a few seconds and it will appear).

8. Name your file with an easy name and save it to a location of your choice.

9. You'll also need a Plist file to edit because Xcode is not generating one anymore so I've uploaded a template for you here. I've put examples in that plist and edit them accordingly.

10. Upload your IPA File and Plist File to your SSL Enabled Server. You should also change the name of the Plist File I've uploaded to match the name of your IPA File.

11. Create a link like this: itms-services://?action=download-manifest&url=http://yourdomain.example/AppName.plist

12. Send the link to your testers and they must click on the link on their devices and an installation alert will show up.

Now, if you don't have an SSL enabled server you can upload the Plist file to your Dropbox account while keeping the IPA file on your non-SSL enabled server and use it like this:

1. Get the link to the file. Should be something like this: https://www.dropbox.com/s/a8hpnmq654pmbaw/AppName.plist?dl=0

2. Copy everything starting with /s/..... and remove the ?dl=0 parameter.

3. Create your installation link like this: itms-services://?action=download-manifest&url=https://dl.dropbox.com/s/a8hpnmq654pmbaw/AppName.plist

4. Send the link to your testers to open it on their devices.

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
Razvan
  • 4,122
  • 2
  • 26
  • 44
  • Your instructions are for how to set up adhoc over-the-air distribution of apps to approved UDID devices by a developer with a paid Apple Developer account only, right? Without a paid ADP account, I can install my app to a test device via Xcode, if the device accepts my personal Apple ID provisioning profile. Can I also set up OTA app distribution? – ziggurism Nov 22 '15 at 01:56
  • @ziggurism I don't know but I don't think so because the provisioning profile you need for OTA is distribution type and not development type which you get with your free ADP account. – Razvan Nov 22 '15 at 07:49
  • This is Apple documentation: http://help.apple.com/deployment/ios/#/apda0e3426d7 (Install in-house apps wirelessly - iOS Deployment Reference). Also, for example, on Xcode 8 there is an option to "include manifest for over-the-air installation" when Archiving the ad-hoc app. Note: You'll need to add the UDID before distributing the app. – Gianfranco P. Jul 25 '17 at 09:49
  • This almost worked for me. I had to make one minor change. The dropbox links needed to have "https://dl.dropboxusercontent.com" as the base domain of the URL. Maybe it depends on what kind of dropbox account? Without that URL style, Safari was saying "the address is invalid". I found the problem by looking at my browser developer tools while vising the Plist link, and I saw it was doing a REDIRECT to dl.dropboxusercontent.com. So when I changed all my links to go to dl.dropboxusercontent.com from the start, then Safari accepted my itms-services link. – pestophagous Jul 24 '20 at 19:45
46

I work in a company that releases on a private store too, and it works in a very similar way. The only difference is, Apple does not check the app and it takes 1 minute to upload it, not 2 weeks.

How it works :

  1. Generate the ipa for entreprise distribution (with the correct provisioning profiles)
  2. Upload the ipa wherever you want, if you need something beautiful, you could make an app that lists your IPA (your own private store) with information about it, and a link to download it (look below)
  3. Upload the .plist file and make it so the url in the url field is the .ipa that you uploaded on step 1.
  4. Create a basic HTML page with this line where you want it :
  5. Users can now click it and download ;)

    <a href="itms-services://?action=download-manifest&url=YOUR-UPLOADED-PLIST-FILE.plist">Click here ;-)</a>
    

Note that you're not allowed to publish apps publicly like this. This is meant, for example, to distribute apps within your own company. More specifically and as an example, we had 4 apps. The store, a timesheeting app, a contact/adress book, and other specific apps that don't need to be explained. But it would be against the EULA of Apple to share any of those apps (or download links) publicly. Trying to publishing on the Apple app store would also not pass the review.

That being said, this is very practical and useful for many companies in a lot of cases, because you're free to not follow any guideline, and avoid the stressful review.

Any other questions :) ?

Gil Sand
  • 5,802
  • 5
  • 36
  • 78
  • 6
    It will be a violation to Apple's Agreements if you distribute the app to general public instead of within your organization. https://developer.apple.com/programs/enterprise/ – Peng90 Jul 02 '15 at 13:46
14

Xcode 9 gives over-the-air installation build option for adhoc distribution.

enter image description here

But apple seems not providing a basic installation html page. So, one needs to create one as shown here.

Here goes the html of such a page from that site.

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> 
  <title>Install Geoloqi</title>
  <style type="text/css">
    body {
      background: url(bkg.png) repeat #c5ccd4;
      font-family: Helvetica, arial, sans-serif;
    }
    .congrats {
      font-size: 16pt;
      padding: 6px;
      text-align: center;
    }
    .step {
      background: white;
      border: 1px #ccc solid;
      border-radius: 14px;
      padding: 4px 10px;
      margin: 10px 0;
    }
    .instructions {
      font-size: 10pt;
    }
    .arrow {
      font-size: 15pt;
    }
    table {
      width: 100%;
    }
  </style>
</head>
<body>

<div class="congrats">Congrats! You've been invited to the beta of Geoloqi.</div>

<div class="step">
  <table><tr>
    <td class="instructions">Install the<br />Geoloqi app</td>
    <td width="24" class="arrow">&rarr;</td>
    <td width="57" class="imagelink">
      <a href="itms-services://?action=download-manifest&url=http://loqi.me/app/Geoloqi.plist">
        <img src="geoloqi-icon.png" height="57" width="57" />
      </a>
    </td>
  </tr></table>
</div>

</body>
</html>
zeeawan
  • 6,667
  • 2
  • 50
  • 56