问题描述
我正在开发 React Native 应用,并在 iOS 模拟器上进行测试.
I am working on react native app, and I do testing on iOS Simulator.
但是,它总是在 iPhone 6 上运行,我不知道如何切换到其他 iPhone 型号,例如 iPhone 6 Plus 或 5.
However, it always runs on iPhone 6, and i don't know how I can switch to other iPhone models like iPhone 6 Plus or 5.
我可以通过转到模拟器 -> 硬件 -> 设备 -> iOS -> iPhone 6 Plus 手动启动不同的设备.
I can start a different device manually by going to Simulator -> Hardware -> Device -> iOS -> iPhone 6 Plus.
但该应用程序仅安装在 iPhone 6 上,当我运行 react-native run ios
时,它总是启动 iPhone 6.
But the app is installed only on iPhone 6, and it always starts iPhone 6 when I run react-native run ios
.
如何更改它以便我可以在不同的 iOS 模拟器设备上运行应用程序?
How can I change it so that I can run the app on different iOS Simulator devices?
推荐答案
react-native run-ios --simulator="iPhone 6s Plus"
据我所知,目前无法指定操作系统.
As far as I can tell there is currently no way to specify the OS.
这篇关于如何选择哪个 iPhone 模型模拟器来运行我的 React Native 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!