Download and install an ipa from self hosted url on iOS
IosIpaIos Problem Overview
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:
Is it possible?
Ios Solutions
Solution 1 - Ios
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
You can use Beta Builder to generate these files:
- Archive your build.
- Save the .ipa on the Desktop.
- Download a small utility Beta Builder from here. This does most of the required task.
- Open the tool and select your .ipa file, then provide the path you will be placing the build on
https://myWeb.com/MY_TEST_APP
in the beta builder. - Generate all the files.
- Now upload
index.html
,your_App.ipa
, &manifest.plist
to your server pathhttps://myWeb.com/MY_TEST_APP
- Now share the link of
index.html
. Once you open this file, you will be asked to Tap on install. - It will install
your_App.ipa
on your device.
You can also do this more 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
andmanifest.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
Solution 2 - Ios
More simply you can utilize DropBox for this. The steps basically remain the same. You can do the following-:
-
upload your .ipa to dropBox, Share the link for this .ipa
-
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.
Solution 3 - Ios
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 : https://stackoverflow.com/questions/8650364/is-there-a-way-to-install-iphone-app-via-browser
Solution 4 - Ios
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
Solution 5 - Ios
Answer for Enterprise account with Xcode8
-
Export the .ipa by checking the "with manifest plist checkbox" and provide the links requested.
-
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).
-
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
- 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
Solution 6 - Ios
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.
Solution 7 - Ios
NSURL *url = [NSURL URLWithString:@"itms-services://?action=download-manifest&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.
Solution 8 - Ios
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.
Solution 9 - Ios
Create a Virtual Machine with Windows running on it and download the file to a shared folder. :-D