了解如何在 iOS 16 及更高版本上启用 iOS 开发者模式以运行内部发行版本和本地开发版本。
这不适用于使用企业配置签名的构建或安装在 iOS 模拟器上的任何构建。
¥This does not apply to builds signed using enterprise provisioning or to any builds installed on an iOS Simulator.
运行 iOS 16 及更高版本的设备需要启用操作系统级别的开发者模式设置,然后才能在设备上安装后运行 内部分配 版本(包括使用 EAS 构建的版本)或本地开发版本。
¥Devices running iOS 16 and above need to enable OS-level Developer Mode setting before they can run internal distribution builds (including those built with EAS) or local development builds after installing them on the device.
你可以通过两种方式在设备上启用开发者模式:
¥There are two ways you can enable Developer Mode on your device:
直接在 iOS 设备上
¥Directly on an iOS device
通过将 iOS 设备与安装了 Xcode 的 Mac 连接
¥By connecting an iOS device with a Mac that has Xcode installed
¥Prerequisites
每个设备都需要遵循下面指定的说明一次。
¥The instructions specified below need to be followed once per device.
¥Enable Developer Mode
¥Directly on an iOS device
要按照以下步骤操作,请在启用开发者模式之前在你的设备上安装你的开发版本。创建版本后,请按照 Expo 仪表板上的说明将其安装到你的 iOS 设备上。
¥To follow the steps below, install your development build on your device before enabling the Developer Mode. When the build is created, follow the instructions on the Expo dashboard to install it on your iOS device.
1
在你的设备上安装该版本后,按应用图标。这将打开一个警报,要求你启用开发者模式。按确定。
¥Once the build is installed on your device, press the app icon. This will open an alert asking you to enable Developer Mode. Press OK.
2
转到“设置”应用,然后导航到“隐私和安全”>“开发者模式”。
¥Go to the Settings app, and navigate to Privacy & Security > Developer Mode.
3
启用切换。你将收到来自 iOS 的提示,要求你重新启动设备。按重新启动。
¥Enable the toggle. You will receive a prompt from iOS to restart your device. Press Restart.
4
设备重新启动后,解锁你的设备。应出现系统警报。按“打开”,然后在出现提示时输入设备的密码。
¥After the device restarts, unlock your device. A system alert should appear. Press Turn On and then, when prompted, enter your device's passcode.
开发者模式现已启用。你现在可以与内部发行版本和本地开发版本进行交互。
¥Developer Mode is now enabled. You can now interact with your internal distribution builds and local development builds.
你可以随时关闭开发者模式。但是,你需要重复相同的过程才能重新启用它。
¥You can turn off Developer Mode at any time. However, you'll need to repeat this same process to re-enable it.
¥Connect an iOS device with a Mac
注意:在执行以下步骤之前,必须在 Mac 设备上安装 Xcode。
¥Note: Xcode must be installed on the Mac device before following the steps below.
你无需先在 iOS 设备上安装开发版本,即可通过将其连接到 Mac 来启用开发者模式。你可以:
¥You don't need to install the development build on your iOS device first to enable Developer Mode by connecting it to a Mac. You can:
1
使用 USB 数据线将你的 iOS 设备连接到 Mac。当“信任这台计算机?”时按 iOS 设备上的“信任”出现警报提示。
¥Connect your iOS device to a Mac using a USB cable. Press Trust on your iOS device when Trust This Computer? alert is prompted.
2
打开 Xcode,然后从菜单栏中导航到“窗口”>“设备和模拟器”。
¥Open Xcode, and from the menu bar, navigate to Window > Devices and Simulators.
在“设备”下,你将看到一条警告“先前的准备错误:开发者模式已禁用”,其中包含有关在 iOS 设备上启用开发者模式的说明。
¥Under Devices, you'll see a warning "Previous preparation error: Developer Mode disabled" with instructions on enabling Developer Mode on the iOS device.
3
在 iOS 设备上,打开“设置”>“隐私和安全”>“开发者模式”。
¥On the iOS device, open Settings > Privacy & Security > Developer Mode.
启用切换。你将收到来自 iOS 的提示,要求你重新启动设备。按重新启动。
¥Enable the toggle. You will receive a prompt from iOS to restart your device. Press Restart.
4
设备重新启动后,解锁你的设备。应出现系统警报。按“打开”,然后在出现提示时输入设备的密码。
¥After the device restarts, unlock your device. A system alert should appear. Press Turn On, and enter your device's passcode when prompted.
开发者模式现已启用。你现在可以与内部发行版本和本地开发版本进行交互。
¥Developer Mode is now enabled. You can now interact with your internal distribution builds and local development builds.
你可以随时关闭开发者模式。但是,你需要重复相同的过程才能重新启用它。
¥You can turn off Developer Mode at any time. However, you'll need to repeat this same process to re-enable it.