ios 临时部署
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19081180/
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
Ad-hoc Deployment
提问by xited
I would like to deploy an app to 20 iOS devices (iPhones and iPads) using Apple Ad-Hoc Deployment. I need to push out the application from a particular computer. Some of the devices that I will be using might have already been synced to computers.
我想使用 Apple Ad-Hoc 部署将应用程序部署到 20 台 iOS 设备(iPhone 和 iPad)。我需要从特定计算机推出应用程序。我将使用的某些设备可能已经同步到计算机。
I'm guessing that once I sync these devices to the computer I'll be using to deploy the app from, the content on each device that has previously been synced to a computer will be wiped. Is that correct? Is there a way around that?
我猜一旦我将这些设备同步到我将用来部署应用程序的计算机上,之前已同步到计算机的每台设备上的内容都将被擦除。那是对的吗?有没有办法解决这个问题?
回答by Santa Claus
If you don't want to use testflight, here is another over-the-air solution:
如果您不想使用 testflight,这里是另一种无线解决方案:
In your xcode project go to
Product > Archive
Click
Distribute
in the xcode organizer window that appears when the operation is completeClick
Save for Enterprise or Ad Hoc Deployment
and choose nextChoose your ad hoc provisioning profile (created in the member center at developer.apple.com. Make sure it has all 20 device uuids included on the profile.
Click
Export
Save it. Make sure to click on the
Save for enterprise distribution
checkbox and fill out the required info. Application URL will be the URL starting with http:// or https:// that will go to your files (see next step)This will save two files
yourFilename.ipa
andyourFileName.plist
. Copy these files to your webserver.Now for the magic. You need to make a link somewhere with the URL
itms-services://?action=download-manifest&url=http://yourwebserver.com/path/to/yourFileName.plist
Assuming all your links work and your provisioning profiles are correct, the app should start installing on any registered device that clicks on that link.
在您的 xcode 项目中转到
Product > Archive
Distribute
在操作完成后出现的xcode管理器窗口中点击单击
Save for Enterprise or Ad Hoc Deployment
并选择下一步选择您的临时配置文件(在 developer.apple.com 上的会员中心创建。确保该文件中包含所有 20 个设备 uuid。
点击
Export
保存。确保单击
Save for enterprise distribution
复选框并填写所需信息。应用程序 URL 将以 http:// 或 https:// 开头的 URL 将转到您的文件(请参阅下一步)这将保存两个文件
yourFilename.ipa
和yourFileName.plist
. 将这些文件复制到您的网络服务器。现在是魔法。你需要在某处用 URL 做一个链接
itms-services://?action=download-manifest&url=http://yourwebserver.com/path/to/yourFileName.plist
假设您的所有链接都有效并且您的配置文件正确,应用程序应该开始安装在任何点击该链接的注册设备上。
If you don't want over the air downloads, you can distribute that .ipa file that was generated in step 6 to your 20 people (their devices must be registered on the provisioning profile still). They can open that file in iTunes and then sync your app with their devices.
如果您不想通过无线方式下载,您可以将第 6 步中生成的 .ipa 文件分发给您的 20 个人(他们的设备仍然必须在配置文件中注册)。他们可以在 iTunes 中打开该文件,然后将您的应用程序与他们的设备同步。
Installation of an application over the air or by syncing with iTunes will not wipe the content of any devices.
通过无线方式或通过与 iTunes 同步安装应用程序不会擦除任何设备的内容。
回答by SinunHenkka
@Santa Claus answer is still valid in 2020. This is a good option to install app to selected devices when you don't want to use testflight for example bacause of 90 days limit.
@Santa Claus 答案在 2020 年仍然有效。当您不想使用 testflight(例如 90 天限制)时,这是将应用程序安装到选定设备的好选择。
Couple of things to point:
需要指出的几点:
- The process order is a little bit different
- When you press
Distribute App
in xcode Archive/Organizer and selectAd Hoc
(or Enterprise) and press next: You have to check the boxinclude manifest for over-the-air installation
(App Thinning can be None) - (6.) in Distribution manifest information: You have to give the urls where you place your file for download. I noticed that the url seems to be case-sensitive so if your app is Foo make sure to put the url like
https://www.example.com/apps/Foo.ipa
- Don't forget to use provisioning profile that have the UUIDs of the devices you want to install the app (can be done Certificates, Identifiers & Profiles in https://developer.apple.com)
- (7.) You will get package of files. You will need
yourFilename.ipa
andmanifest.plist
- (8.) Use the manifest.plist in the url, I created a dummy web page where I placed this kind of button (Same place should have the *.ipa file)
<a class="btn-download" href="itms-services://?action=download-manifest&url=https://www.example.com/path/manifest.plist">Download</a>
- 流程顺序有点不同
- 当您按
Distribute App
xcode Archive/Organizer 并选择Ad Hoc
(或 Enterprise)并按下一步时:您必须选中该框include manifest for over-the-air installation
(App Thinning 可以为 None) - (6.) 在分发清单信息中:您必须提供放置文件以供下载的网址。我注意到 url 似乎区分大小写所以如果你的应用程序是 Foo 确保把 url 像
https://www.example.com/apps/Foo.ipa
- 不要忘记使用具有要安装应用程序的设备的 UUID 的配置文件(可以在https://developer.apple.com 中完成证书、标识符和配置文件)
- (7.) 您将获得文件包。您将需要
yourFilename.ipa
和manifest.plist
- (8.) 在 url 中使用 manifest.plist,我创建了一个虚拟网页,我在其中放置了这种按钮(同一个地方应该有 *.ipa 文件)
<a class="btn-download" href="itms-services://?action=download-manifest&url=https://www.example.com/path/manifest.plist">Download</a>
If you don't get error when clicking the download with safari browser in the selected device (UUID match) it will install the app. (Might not give any feedback of success but the icon is found on desktop and the app can be launched)
如果在所选设备(UUID 匹配)中使用 safari 浏览器单击下载时没有出现错误,它将安装该应用程序。(可能不会给出任何成功的反馈,但在桌面上可以找到图标并且可以启动应用程序)