从iOS上的url下载并安装ipa [英] Download and install an ipa from url on iOS
问题描述
我需要直接从网址下载并安装 ipa
。
I need to download and install an ipa
directly from an URL.
我试过这个:
NSURL *url = [NSURL URLWithString:@"https://myWeb.com/test.ipa"];
[[UIApplication sharedApplication] openURL:url];
该应用程序启动Safari但会显示以下消息:
The app launches Safari but then this message appears:
有可能吗?
推荐答案
通过无线方式分发你的应用程序(OTA) ,这意味着没有使用TestFlight或官方App Store),您可能需要创建3个不同的文件,即:
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:
- .ipa文件(使用ad-hoc配置文件)
- index.html
- manifest.plist
您可以使用 Beta Builder 生成这些文件:
You can use Beta Builder to generate these files:
- 归档你的版本。
- 将.ipa保存在桌面上。
- 下载一个小工具 Beta Builder 来自此处。这可以完成大部分所需的任务。
- 打开工具并选择.ipa文件,然后提供您将构建的路径
https://测试版构建器中的myWeb.com/MY_TEST_APP
。 - 生成所有文件。
- 现在上传
index.html
,your_App.ipa
,&manifest.plist
到您的服务器路径https://myWeb.com/MY_TEST_APP
- 现在分享
index.html
的链接。打开此文件后,系统会要求您点击安装。 - 它将在您的设备上安装
your_App.ipa
。
- 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>安装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:
- 编译/存档应用时使用的配置文件
- 两者中的URL
index.html
和manifest.plist
-
plist
文件可能需要托管在HTTPS服务器上。如有必要,您可以使用Dropbox。 - 您的设备UUID可能需要在Apple开发人员中心注册,除非您拥有Enterprise许可证
- 您可能需要在设置>个人资料中手动启用对应用的访问
- 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
这篇关于从iOS上的url下载并安装ipa的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!