当用react-native run-ios测试React原生应用程序时,它会打开一个iPhone模拟器.

您可以在模拟器选项中将虚拟设备更改为iPad,但React Native应用程序不会出现在已安装应用程序列表中.

有没有办法从CLI打开iPad模拟器?

推荐答案

--simulator国旗是你要找的

例如,react-native run-ios --simulator 'iPad 2'将在iPad 2模拟器上运行该应用程序.

作为一个侧 node ,如果您需要获得可用模拟器的列表及其名称,请使用xcrun simctl list devices

React-native相关问答推荐

获取 TypeError:this.InnerNativeModule.configureProps 不是 mac 上 expo 中的函数

React Native TextInput 在android上打开时会自动关闭

错误:HostFunction 中的异常: Malformed calls from JS: field sizes are different. In an Animated View

在 React Native 中从 Modal 打开 Modal

从 .apk 到 .aab 的本地构建版本react,如何将应用程序发送给客户端?

React Native 将 base64 图像保存到相册

React Native WebView 中的 Javascript console.log()

如何在 React Native 中创建和保存 CSV 文件?

用于部署后设置的 React 配置文件

如何在获取请求中传递 POST 参数?

纯在 Swift 中的 React Native 应用程序

命令失败:gradlew.bat installDebug error whenever installing dependencies like navigation, firebase, icons etc in React-Native

React native base headers for ios not found

No such property: ABI for class: org.gradle.api.tasks.OutputFile

如何渲染多行文本组件,行间有白色间隙

如何在 react-native 中从 AsyncStorage 中删除元素

React.createClass vs. ES6 箭头函数

ListView 和 FlatList 有什么区别?

使用 React Native 一次启动多个 Animated.timing

如何在android studio中导入react native元素