简体   繁体   English

Xcode 4.5 - 在我的设备上无线构建应用程序

[英]Xcode 4.5 - Wirelessly build app on my device

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. 我用iTunes设置了设备,因此我可以进行无线同步。 So other than testing my apps on my device the phone is still 100% usable. 因此,除了在我的设备上测试我的应用程序外,手机仍可100%使用。

I was reading this other post Xcode 4.2 Support Wirelessly Connected Devices that seems to be talking about wirelessly building apps onto devices. 我正在阅读另一篇文章Xcode 4.2支持无线连接设备似乎在谈论无线在设备上构建应用程序。 But they also say it was removed in Xcode 4.3.1. 但是他们也说它在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中并在那里同步我的设备,但在那时我宁愿只是借用一个朋友设备进行测试。

You can certainly do this. 你当然可以这样做。 Make your own app store :) 制作自己的应用商店:)

First, build your app to an archive (.IPA) file. 首先,将您的应用程序构建到存档(.IPA)文件。 Next, export your project PLIST file. 接下来,导出项目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: 最后:

  1. Ensure that the string entry for [URL] contains the correct path to your archive (IPA). 确保[URL]的字符串条目包含存档的正确路径(IPA)。
  2. Create a small HTML page with a download link to that plist file. 创建一个小HTML页面,其中包含指向该plist文件的下载链接。 (see below) Be sure to include the mime-types below! (见下文)请务必在下面添加mime类型!

  3. Navigate to that download link via your iPhone and install! 通过iPhone导航到该下载链接并安装!

    a href=itms-services://?action=download-manifest&url=YOURURLGOESHERE>Download App a href = itms-services://?action = download-manifest&url = YOURURLGOESHERE>下载App

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. 如果您尝试导航除iPhone之外的任何其他内容,您将收到有关未识别的itms协议的错误。 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. 粘贴到网址浏览器中,然后删除除plist URL位置之外的所有内容。 This should kick off a download on you browser and you should receive the ipa file (which you can uncompress and check out) 这应该开始下载你的浏览器,你应该收到ipa文件(你可以解压缩和检查)

Find more info here ! 在这里找到更多信息!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM