56

I need to download and install an ipa directly from an URL.

I have tried this:

NSURL *url = [NSURL URLWithString:@"https://myWeb.com/test.ipa"];
[[UIApplication sharedApplication] openURL:url];

The app launches Safari but then this message appears:

Error Message "Download Failed, Safari cannot download this file."

Is it possible?

AsimRazaKhan
  • 2,154
  • 3
  • 22
  • 36
Andoxko
  • 1,021
  • 2
  • 12
  • 19
  • Afaik, you cannot install IPAs directly onto your device. You might want to check out [TestFlight](http://testflightapp.com/) though. – vzwick May 09 '14 at 09:50
  • you are doing a wrong approach. Let me give you proper answer. – Balram Tiwari May 09 '14 at 09:50
  • What profile did you use to compile the ipa, developer or distribution? – Satheesh May 09 '14 at 09:52
  • 1
    Upload your ipa to [Diawi](http://www.diawi.com/) mail the generated url to yourself then open mail click on url it should open in safari click to install app. – Bharat May 09 '14 at 09:52
  • 1
    Kindly check the Beta Builder. Ideally we should not upload our work to third party servers. I have been using beta builder for all long & all the ipa & generated work is there locally. You just need to upload the files to your distribution server or an account like DropBox or amazon S3 or your local server. – Balram Tiwari May 09 '14 at 10:08

9 Answers9

151

To distribute your app over-the-air (OTA, this means without using TestFlight or the official App Store), you may need to create 3 different files, namely:

  • The .ipa file (using an ad-hoc provisioning profile)
  • index.html
  • manifest.plist

See https://support.apple.com/en-gb/guide/deployment/depce7cefc4d/web for more information.

You can look for a service to generate them for you or you can do it manually:

index.html

<a href="itms-services://?action=download-manifest&url=https://myWeb.com/MY_TEST_APP/manifest.plist">Install App</a>

manifest.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>items</key>
    <array>
        <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                    <string>http://YOUR_SERVER_URL/YOUR-IPA-FILE.ipa</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.yourCompany.productName</string>
                <key>bundle-version</key>
                <string>1.0.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>YOUR APP NAME</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

If the app refuses to install or run, you may need to check the following items:

  • The provisioning profile you've used when compiling/archiving your app
  • The URLs in both index.html and manifest.plist
  • The plist file may possibly need to be hosted on an HTTPS server. You can use Dropbox for this if necessary.
  • Your device UUIDs may need to be registered inside Apple Developer Center unless you have an Enterprise licence
  • You may need to manually enable access to the app within Settings > Profiles
luk2302
  • 55,258
  • 23
  • 97
  • 137
Balram Tiwari
  • 5,657
  • 2
  • 23
  • 41
  • First of all thanks for your accurate and large answer :) Okey I understand the method, but is it possible to execute ´itms-services://?action=download-manifest&url=https://myWeb.com/MY_TEST_APP/manifest.plist´directly from the app?Because in the way it is possible I need to download and install the app without leaving the other one. Bu Maybe it is impossible... – Andoxko May 09 '14 at 10:25
  • As per my knowledge, You have to leave the app. On Air install can be done by using Safari. (I may not be correct). In fact you can try this in your app & let us know if that work's :-) – Balram Tiwari May 09 '14 at 10:26
  • @AndoniMuruamendiaraz : I will be waiting for confirmation on this, if that works or not using [UIApplication]. Acceptance of answer is still pending. ;-) – Balram Tiwari May 09 '14 at 10:32
  • Forgive my ignorance, but I am relatively new on all this. What does On Air install mean? and what do you mean with "if that works or not using [UIApplication]" ? And of course, once I understand your last proposal I'll automatically accept you great answer ;) – Andoxko May 09 '14 at 11:01
  • @AndoniMuruamendiaraz : On Air Install: Mechanism of distributing apps & installing it on device other than the Apple iTunes Route. Whatever you are trying & I am suggesting is on air distribution. It is mainly for distributing enterprise app or may be used for distributing apps to known devices & people for testing. – Balram Tiwari May 09 '14 at 11:08
  • @AndoniMuruamendiaraz : In you question, you have given the code as `[[UIApplication sharedApplication] openURL:url];` I was referring this `UIApplication` only. Also I was expecting you to try the URL value as `itms-services://?action=download-manifest&url=myWeb.com/MY_TEST_APP/manifest.plist` as I have never tried it using directly from within an App. I have been distributing apps via this method where you tap Index.html & it used to get install on that known device,( as the provisioning profile is provided with the install.) – Balram Tiwari May 09 '14 at 11:12
  • thank you very much! I have tried to set ´itms-services://?action=download-manifest&url=myWeb.com/MY_TEST_APP/manifest.pl‌​ist´ as the URL value and it hasn't worked :( but i will take a look on the on air install thanks again!! :) – Andoxko May 09 '14 at 11:44
  • @BalramTiwari I have tried to use "UIApplication.sharedApplication().openURL(NSURL(string:url)!)" It starts to download the ipa but around 60% its stop and shows Unable to Downlaod App. Is there any way to solve this issue ? – Hiren Nov 10 '15 at 09:59
  • @Hiren : Please make sure to generate the .ipa file using right provisioning profile. (Propably adhoc-Provisioning profile ). That will solve the issue. Make sure you are downloading it on to a device whose UUID is registered with on your Developer account. (So you try this on your test device.) – Balram Tiwari Nov 11 '15 at 08:10
  • 5
    I've edited your answer to include a bit more detail and an example of `index.html`. I hope that's OK. – Simon East Mar 18 '16 at 05:35
  • @Simon If I understand this answer correctly it would allow me to host a downloadable/installable version of an iPA file on my own site. Whoever I share the index.html link with should be able to install my app? Do I need to have the UDID info for each device that will be installing? – Austin Jun 05 '17 at 19:16
  • 1
    @Austin : It depends on the type of developer account's certificate / provisioning profiles you are using to distribute the app. If you are distributing via Enterprise account ($299), then you can just relax as anyone having the link can download the app, but using the normal $99 developer account you would still need to add the devices & include them into the Provisioning profiles. – Balram Tiwari Jun 22 '17 at 13:07
  • @Balram i have the enterprise account (the $299 a year one). My developer told me the only way I can share the iPA file is to upload it to diawi.com. Is that the only way or can I just include a link to the iPA file on my own website? – Austin Jun 23 '17 at 14:48
  • @Austin you can host your app on your own website. The app must include an in-house (enterprise program) or ad hoc provisioning profile. And you need an XML manifest file, which can be created with Xcode when exporting the IPA file. Safari on iOS will allow users to install the app when the manifest is opened. See instructions from Apple here: http://help.apple.com/deployment/ios/#/apda0e3426d7 – Sky Dec 07 '17 at 12:19
  • The `Beta builder` is out of maintenance, what a pity! – Itachi Dec 26 '18 at 06:03
  • 1
    @BalramTiwari The given link to download beta builder is BROKEN, Pls fix it. – MANISH PATHAK Jan 26 '20 at 22:21
  • The given link to download beta builder is BROKEN, Pls fix it. – J.Arji Jul 05 '21 at 09:40
  • 1
    Source instructions from Apple as of Oct 2022: https://support.apple.com/guide/deployment/distribute-proprietary-in-house-apps-depce7cefc4d/web – Shawn Erquhart Oct 17 '22 at 21:52
15

More simply you can utilize DropBox for this. The steps basically remain the same. You can do the following-:

1) upload your .ipa to dropBox, Share the link for this .ipa

2) Paste the shared link for .ipa in your manifest.plist file , Upload manifest file in DropBox again share the link for this .plist file

3)paste the link for this Plist in your index.html file with a suitable tag.

Share this index.html file with anybody who can tap on the URL and download. or you can directly hit the URL instead.

Vahid Farahmandian
  • 6,081
  • 7
  • 42
  • 62
Vkharb
  • 856
  • 11
  • 19
6

Yes, safari will detect the *.ipa and will try to install it, but the ipa needs to be correctly signed and only allowed devices would be able to install it.

http://www.diawi.com is a service that will help you with this process.

All of this is for Ad-hoc distribution, not for production apps.

More information on below link : Is there a way to install iPhone App via browser?

Mtoklitz113
  • 3,828
  • 3
  • 21
  • 40
IamAnil
  • 496
  • 5
  • 19
  • Other services that can help with this are AbbaShare ( https://github.com/mabuonomo/abbashare_web ), AppHost ( https://appho.st ), and Hockey ( https://hockeyapp.net) – SMX Nov 14 '18 at 15:57
4

Answer for Enterprise account with Xcode8

  1. Export the .ipa by checking the "with manifest plist checkbox" and provide the links requested.

  2. Upload the .ipa file and .plist file to the same location of the server (which you provided when exporting .ipa/ which mentioned in the .plist file).

  3. Create the Download Link as given below. url should link to your .plist file location.

    itms-services://?action=download-manifest&url=https://yourdomainname.com/app.plist

  4. Copy this link and paste it in safari browser in your iphone. It will ask to install :D

Create a html button using this full url

Lahiru Pinto
  • 1,621
  • 19
  • 20
4

There are online tools that simplify this process of sharing, for example https://abbashare.com or https://diawi.com Create an ipa file from xcode with adhoc or inhouse profile, and upload this file on these site. I prefer abbashare because save file on your dropbox and you can delete it whenever you want

Mario Buonomo
  • 167
  • 2
  • 6
1

It won't be possible if you like to directly download and install the app from your website. There is a different way for enterprise to deploy and install app over the air. Your URL should point to a web service that hosts a manifest plist file in predefined format required by Apple. This service should return the url of manifest file which can then be used as below:

NSString *urlString = // url string where your manifest.plist is deployed on your server.
NSURL *installationURL = [NSURL URLWithString:[NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@",[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
[[UIApplication sharedApplication] openURL];

Hope this answers your question.

mithlesh jha
  • 343
  • 2
  • 11
1

There are now more new tools available with more new features to distribute and even manage your Projects and applications (ipa and apk), in my view https://appforshare.io is the recent new tool that does a lot apart from distributing ad-hoc or development builds.

Hamza Hasan
  • 1,368
  • 9
  • 17
0
NSURL *url = [NSURL URLWithString:@"itms-services://?action=download-manifest&amp;url=https://xxxxxx.com/rest/images/apps/ipa/dev/xyz.plist"]];
[[UIApplication sharedApplication] openURL:url];

openUrl method was deprecated.

[[UIApplication sharedApplication] openURL: url options:@{} completionHandler:nil];

This method latest openUrl method and it will display prompt dialog.The dialog will show

xxxxxx.com would like to install "YOUR_APP_NAME"

this messages. If you click the "install" button application will close and ipa will download.

abdlkdr
  • 152
  • 2
  • 14
-4

Create a Virtual Machine with Windows running on it and download the file to a shared folder. :-D

Nico Westerdale
  • 2,147
  • 1
  • 24
  • 31