从 iOS 上的自托管 url 下载并安装 ipa
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23561370/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Download and install an ipa from self hosted url on iOS
提问by Andoxko
I need to download and install an ipa
directly from an URL.
我需要ipa
直接从 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:
该应用程序启动 Safari,但随后出现此消息:
Is it possible?
是否可以?
回答by Balram Tiwari
To distribute your app over-the-air (OTA, this means withoutusing TestFlight or the official App Store), you may need to create 3 different files, namely:
要通过无线方式分发您的应用程序(OTA,这意味着不使用 TestFlight 或官方 App Store),您可能需要创建 3 个不同的文件,即:
- The .ipa file (using an ad-hoc provisioning profile)
- index.html
- manifest.plist
- .ipa 文件(使用临时配置文件)
- 索引.html
- 清单文件
You can use Beta Builderto generate these files:
您可以使用Beta Builder生成这些文件:
- Archive your build.
- Save the .ipa on the Desktop.
- Download a small utility Beta Builderfrom 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.
- 归档您的构建。
- 将 .ipa 保存在桌面上。
- 从这里下载一个小实用程序Beta Builder。这完成了大部分必需的任务。
- 打开该工具并选择您的 .ipa 文件,然后提供您将
https://myWeb.com/MY_TEST_APP
在 beta 构建器中放置构建的路径。 - 生成所有文件。
- 现在将
index.html
,your_App.ipa
, &上传manifest.plist
到您的服务器路径https://myWeb.com/MY_TEST_APP
- 现在分享 的链接
index.html
。打开此文件后,系统会要求您点击安装。 - 它将安装
your_App.ipa
在您的设备上。
You can also do this more manually.
您也可以更手动地执行此操作。
index.html
索引.html
<a href="itms-services://?action=download-manifest&url=https://myWeb.com/MY_TEST_APP/manifest.plist">Install App</a>
<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
- 您在编译/归档应用程序时使用的配置文件
- 同时在网址
index.html
和manifest.plist
- 该
plist
文件可能需要托管在 HTTPS 服务器上。如有必要,您可以为此使用 Dropbox。 - 除非您拥有企业许可证,否则您的设备 UUID 可能需要在 Apple Developer Center 中注册
- 您可能需要在“设置”>“个人资料”中手动启用对应用程序的访问
回答by Vkharb
More simply you can utilize DropBox for this. The steps basically remain the same. You can do the following-:
更简单的是,您可以为此使用 DropBox。步骤基本保持不变。您可以执行以下操作-:
1) upload your .ipa to dropBox, Share the link for this .ipa
1) 将您的 .ipa 上传到 dropBox,分享此 .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
2) 将 .ipa 的共享链接粘贴到 manifest.plist 文件中,再次在 DropBox 中上传清单文件共享此 .plist 文件的链接
3)paste the link for this Plist in your index.html file with a suitable tag.
3) 将此 Plist 的链接粘贴到您的 index.html 文件中,并使用合适的标签。
Share this index.html file with anybody who can tap on the URL and download. or you can directly hit the URL instead.
与可以点击 URL 并下载的任何人共享此 index.html 文件。或者您可以直接点击网址。
回答by IamAnil
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.
是的,safari 会检测 *.ipa 并尝试安装它,但需要正确签署 ipa,并且只有允许的设备才能安装它。
http://www.diawi.comis a service that will help you with this process.
http://www.diawi.com是一项可以帮助您完成此过程的服务。
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?
有关以下链接的更多信息: 有没有办法通过浏览器安装 iPhone 应用程序?
回答by Mario Buonomo
There are online tools that simplify this process of sharing, for example https://abbashare.comor https://diawi.comCreate 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
有一些在线工具可以简化这个共享过程,例如https://abbashare.com或https://diawi.com从 xcode 使用 adhoc 或内部配置文件创建一个 ipa 文件,并将此文件上传到这些站点。我更喜欢 abbashare 因为将文件保存在您的保管箱中,您可以随时删除它
回答by Lahiru Pinto
Answer for Enterprise account with Xcode8
使用 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
通过选中“使用清单 plist 复选框”导出 .ipa 并提供请求的链接。
将 .ipa 文件和 .plist 文件上传到服务器的同一位置(您在导出 .ipa/ 时提供的 .plist 文件中提到的)。
创建下载链接,如下所示。url 应该链接到您的 .plist 文件位置。
itms-services://?action=download-manifest&url= https://yourdomainname.com/app.plist
复制此链接并将其粘贴到 iPhone 的 safari 浏览器中。它会要求安装:D
Create a html button using this full url
使用这个完整的 url 创建一个 html 按钮
回答by mithlesh jha
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:
如果您想直接从您的网站下载并安装该应用程序,这是不可能的。企业可以通过一种不同的方式通过无线方式部署和安装应用程序。您的 URL 应该指向一个 Web 服务,该服务以 Apple 要求的预定义格式托管清单 plist 文件。此服务应返回清单文件的 url,然后可以如下使用:
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.
希望这能回答你的问题。
回答by Nico Westerdale
Create a Virtual Machine with Windows running on it and download the file to a shared folder. :-D
创建运行 Windows 的虚拟机并将文件下载到共享文件夹。:-D