iOS – 通过 Wi-Fi 运行/调试/安装构建
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23827168/
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
iOS – Run/Debug/Install builds over Wi-Fi
提问by Indrajeet
We have iPad and iPhone devices, but short of wires. Is there any way that we can install/debug the builds over Wi-Fi in iOS?
我们有 iPad 和 iPhone 设备,但没有电线。有什么方法可以在 iOS 中通过 Wi-Fi 安装/调试构建?
I know the way in Android, but not of iOS.
我知道 Android 的方式,但不知道 iOS 的方式。
回答by Indrajeet
Now by using Xcode 9 and iOS 11 it is possible to run apps by using Wi-Fi.
现在通过使用 Xcode 9 和 iOS 11,可以使用 Wi-Fi 运行应用程序。
Connect the iPhone via USB, go into the device window (Cmd-Shift-2), select your phone, and check the connect via network
box.
通过 USB 连接 iPhone,进入设备窗口 ( Cmd- Shift- 2),选择您的手机,然后选中该connect via network
框。
More thorough instructions with screenshots here
Pre-Xcode 9 answer:
Xcode 9 之前的答案:
Over Wi-Fi installing and debugging of applications is not possible in iOS.
在 iOS 中无法通过 Wi-Fi 安装和调试应用程序。
But there are some websites where you can upload your builds and then download on device and test it.
但是在某些网站上,您可以上传您的构建,然后下载到设备上并进行测试。
回答by Minhal Khan
(Before you read make sure your running IOS 11 and Xcode 9!) Connect your device (Via USB), once you do go on 'Add Additional Simulators' (See image 2 at the bottom), and tick 'connect via network' (See Image One). Once XCode proccesses this, disconnect the device (via USB) and it should now appear with a globe next to it (See image 2)! Also make sure the device and computer are on the same network!
(在阅读之前,请确保您正在运行 IOS 11 和 Xcode 9!)连接您的设备(通过 USB),一旦您继续“添加其他模拟器”(参见底部的图片 2),并勾选“通过网络连接”(见图像一)。一旦 XCode 处理这个,断开设备(通过 USB),它现在应该出现在它旁边的地球上(见图 2)!还要确保设备和计算机在同一网络上!
回答by Rajesh Kumar
Using Xcode 9 you can debug over wifi(same network).
使用 Xcode 9,您可以通过 wifi(同一网络)进行调试。
回答by Rajesh Loganathan
Simple Solution: http://diawi.com
简单的解决方案:http: //diawi.com
Upto Xcode 8 & iOS 10 :Through wifi its not possible.
高达 Xcode 8 和 iOS 10:通过 wifi 是不可能的。
You just upload your ".ipa"
file to this website http://diawi.com& get sort link for that. After that install build by requesting that link in iphone browser.
您只需将您的".ipa"
文件上传到这个网站http://diawi.com并获得排序链接。之后通过在 iphone 浏览器中请求该链接来安装构建。
From Xcode 9+ & iOS 11+ :Its possible install debug build through wifi.
从 Xcode 9+ 和 iOS 11+ 开始:它可以通过 wifi 安装调试版本。
- Open your project on Xcode
- Connect your ios device with USB cable.
- In xcode menu open Window -> Devices and Simulatorsor press
(Cmd-Shift-2)
. You should see your device as connected devices. - Select your device and enable check box “Connect via network”.
- Now you can see a network iconnext to your phone name. This icon confirms that you can able to run build in wifi.
- Now run your build through wifi to install build in your ios devices.
- 在 Xcode 上打开您的项目
- 使用 USB 数据线连接您的 ios 设备。
- 在 xcode 菜单中打开Window -> Devices and Simulators或按
(Cmd-Shift-2)
。您应该将您的设备视为已连接的设备。 - 选择您的设备并启用复选框“通过网络连接”。
- 现在您可以在您的电话名称旁边看到一个网络图标。此图标确认您可以在 wifi 中运行构建。
- 现在通过 wifi 运行您的构建以在您的 ios 设备中安装构建。
回答by Viraj Padsala
Make sure you have at least Xcode 9 or later and a device with iOS 11 or later
确保您至少拥有 Xcode 9 或更高版本以及 iOS 11 或更高版本的设备
1- Open your project on Xcode
1- 在 Xcode 上打开您的项目
2- Plugged in your iPhone with USB cable.
2- 用 USB 线插入你的 iPhone。
3- Open Window > Devices and Simulators
You should see your device as connected devices
3- 打开窗口 > 设备和模拟器
您应该将您的设备视为已连接的设备
4- Select Devices from the top, Select your device from left and Check the “Connect via network” box
4- 从顶部选择设备,从左侧选择您的设备并选中“通过网络连接”框
5- Now if Xcode can connect to your device via network, you should see a network icon after your phone name
5- 现在,如果 Xcode 可以通过网络连接到您的设备,您应该会在您的手机名称后面看到一个网络图标
6- Unplug your USB cord
6- 拔下 USB 线
7- Go back to Xcode and Hit the Run button
7- 返回 Xcode 并点击 Run 按钮
回答by Amr Lotfy
For deployment/CI I have tried and highly recommend BuddyBuildsolution, here is some of the many features it has:
对于部署/CI,我已经尝试并强烈推荐BuddyBuild解决方案,以下是它具有的众多功能中的一些:
- Excellent user help (chat/email) system and online service.
- Supports webhooksso that a build is started whenever you push to your App repository. (All Git source control repos supported)
- You can arrange system to auto send your builds to a preset list of testers/users whenever builds are ready.
- You can [Auto] integrate their SDK to allow user feedback and crash reports.
- It auto checks your app for compatibility with latest Xcode versions.
- 优秀的用户帮助(聊天/电子邮件)系统和在线服务。
- 支持webhooks,以便在您推送到应用程序存储库时启动构建。(支持所有 Git 源代码控制存储库)
- 您可以安排系统在构建准备好时自动将您的构建发送到测试人员/用户的预设列表。
- 您可以 [Auto] 集成他们的 SDK 以允许用户反馈和崩溃报告。
- 它会自动检查您的应用程序与最新 Xcode 版本的兼容性。
回答by Parth Pandya
Please check out this tutorial, http://honzadvorsky.com/articles/2015-10-21-17-40-xcode_server_tutorials_4_certificates__provisioning_profiles/
here you can find a way for "App Installation over Wi-Fi"
在这里您可以找到“通过 Wi-Fi 安装应用程序”的方法
I have not get a chance to implement it yet, but may be will try it out asap. meanwhile if someone is free then can try and post their view here so others can get help. Thanks
我还没有机会实施它,但可能会尽快尝试。同时,如果有人有空,那么可以尝试在此处发布他们的观点,以便其他人可以获得帮助。谢谢
回答by Nerius Buteikis
Requirements: iOS 11 and XCode 9, iOS device and computer on same wifi network. Connect your device with USB Cable, launch Xcode, then on Xcode menu, choose: Window->Devices and Simulators. Choose device and check "Connect via network". Now you can disconnect USB and develop on device using wifi. ScreenShot
要求:iOS 11 和 XCode 9,iOS 设备和计算机在同一 wifi 网络上。使用 USB 电缆连接您的设备,启动 Xcode,然后在 Xcode 菜单上,选择:Window->Devices and Simulators。选择设备并勾选“通过网络连接”。现在您可以断开 USB 连接并使用 wifi 在设备上进行开发。 截屏
回答by saroj raut
回答by Andy
To activate a Wireless Debugging
for iOS device to Run
|Debug
|Install
your builds over Wi-Fi, you need to take six steps:
要激活Wireless Debugging
的iOS设备Run
| Debug
| Install
您通过 Wi-Fi 构建,您需要执行六个步骤:
Connect a device via USB cable to the Mac with macOS 10.12.4+ and Xcode 9+ installed.
Launch Xcode.
Press Shift-Command-2or go to Window-Devices and Simulatorsmenu.
In the
Devices
tab select the devices from theConnected
section.Select the
Connect via network
checkbox (and wait for a few minuteswhen it's finished).Disconnect USB cable.
通过 USB 电缆将设备连接到安装了 macOS 10.12.4+ 和 Xcode 9+ 的 Mac。
启动 Xcode。
按Shift- Command-2或转到Window-Devices and Simulators菜单。
在
Devices
选项卡中,从该Connected
部分选择设备。选中
Connect via network
复选框(完成后等待几分钟)。断开 USB 电缆。
This Networkicon in the left panel means – Wireless Debugging is OK
.
左侧面板中的此网络图标表示 – Wireless Debugging is OK
。
On iPhone go to
General
–Device Management
–Application to trust
and press TRUST.Now you can
Run
|Debug
|Install
your builds over Wi-Fi.
在 iPhone 上转到
General
–Device Management
–Application to trust
并按TRUST。现在你可以
Run
|Debug
|Install
您通过 Wi-Fi 构建。