Xcode 4.5 - 在我的设备上无线构建应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12807979/
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
Xcode 4.5 - Wirelessly build app on my device
提问by rob1302
So recently my iPhone 4 decided to stop working and I can no longer connect it to my Mac or PC with a USB (it'll only charge if I connect it to a USB that's in a wall outlet and I have to push the 30 pin connector upwards while inserting) but that's another issue.
所以最近我的 iPhone 4 决定停止工作,我无法再通过 USB 将它连接到我的 Mac 或 PC(它只会在我将它连接到墙上插座中的 USB 时充电,我必须按下 30 针插入时连接器向上)但这是另一个问题。
The problem is that I can no longer build and test my app on my device. I have my device set up with iTunes so I can do a wireless sync. So other than testing my apps on my device the phone is still 100% usable.
问题是我无法再在我的设备上构建和测试我的应用程序。我的设备设置了 iTunes,所以我可以进行无线同步。所以除了在我的设备上测试我的应用程序之外,手机仍然 100% 可用。
I was reading this other post Xcode 4.2 Support Wirelessly Connected Devicesthat seems to be talking about wirelessly building apps onto devices. But they also say it was removed in Xcode 4.3.1.
我正在阅读另一篇文章Xcode 4.2 Support Wirelessly Connected Devices,它似乎在谈论将应用程序无线构建到设备上。但他们也说它在 Xcode 4.3.1 中被删除了。
I've never actually used this feature in previous Xcode's so i'm not sure if that's what they were actually for/if they worked well or what not.
我从未在以前的 Xcode 中实际使用过此功能,因此我不确定这是否是它们的实际用途/它们是否运行良好或不正常。
Basically i'm asking if anyone knows a way to build my apps wirelessly to my device.
基本上我在问是否有人知道一种将我的应用程序无线构建到我的设备的方法。
I guess I could build make an AdHoc release, put the app file in my iTunes and sync my device there, but at that point I would rather just borrow a friends device to test on.
我想我可以构建一个 AdHoc 版本,将应用程序文件放在我的 iTunes 中并在那里同步我的设备,但此时我宁愿只借用朋友的设备进行测试。
回答by Clayton Selby
You can certainly do this. Make your own app store :)
你当然可以这样做。制作您自己的应用商店 :)
First, build your app to an archive (.IPA) file. Next, export your project PLIST file.
首先,将您的应用程序构建为存档 (.IPA) 文件。接下来,导出您的项目 PLIST 文件。
This should look something like this:
这应该是这样的:
<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>[URL]</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.usaa.FileTransfer</string>
<key>bundle-version</key>
<string>2.21</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>File Transfer</string>
</dict>
</dict>
</array>
</dict>
</plist>
Finally:
最后:
- Ensure that the string entry for [URL] contains the correct path to your archive (IPA).
Create a small HTML page with a download link to that plist file. (see below) Be sure to include the mime-types below!
Navigate to that download link via your iPhone and install!
a href=itms-services://?action=download-manifest&url=YOURURLGOESHERE>Download App
- 确保 [URL] 的字符串条目包含正确的存档路径 (IPA)。
创建一个小的 HTML 页面,其中包含指向该 plist 文件的下载链接。(见下文)一定要包括下面的哑剧类型!
通过您的 iPhone 导航到该下载链接并安装!
a href=itms-services://?action=download-manifest&url=YOURURLGOESHERE>下载应用
MIME Types
MIME 类型
application/octet-stream ipa
text/xml plist
If you try to navigate on anything other than an iPhone you will get an error about the itms protocol not being recognized. You can test this out on your desktop by right clicking the link, and select copy shortcut. Paste into the url browser, and remove the everything except your plist URL location. This should kick off a download on you browser and you should receive the ipa file (which you can uncompress and check out)
如果您尝试在 iPhone 以外的任何设备上导航,您将收到有关无法识别 itms 协议的错误。您可以通过右键单击链接在桌面上进行测试,然后选择复制快捷方式。粘贴到 url 浏览器中,并删除除 plist URL 位置之外的所有内容。这应该会在您的浏览器上开始下载,您应该会收到 ipa 文件(您可以解压缩并签出)
Find more info here!
在这里找到更多信息!