[英]React-Native: iOS Simulator cannot be found
我正在尝试启动我的第一个反应原生项目。 我无法启动iOS模拟器。 只有在我运行react-native run-ios
命令时才会发生这种情况; 我不能为任何设备(iPhone 6,7,8和Xr)运行它,以便将XR从终端复制并粘贴到模拟器=“iPhoneXʀ”参数中。 如果我运行以下代码:
xcrun simctl list devices
然后我得到一个模拟器列表,但他们都说“(关机)”。 这很奇怪,因为我可以使用expo客户端完全运行应用程序,并且会出现一个模拟器。
在线,我看到很多线程讨论模拟器的问题,因为对XCode的一些更新,但我不完全确定我的情况应该是什么修复。 一方面,终端表示没有模拟器,但另一方面,我可以使用expo客户端启动启动iPhone XR模拟器。 但是,模拟器中没有应用程序。
首先,这是我使用react-native run-ios
得到的错误:
Found Xcode workspace first-app.xcworkspace
Could not find iPhone 6 simulator
Error: Could not find iPhone 6 simulator
at /Users/user/JS_practice/first-app/node_modules/react-native/local-cli/runIOS/runIOS.js:149:7
at new Promise (<anonymous>)
at runOnSimulator (/Users/User/Documents/first-app/node_modules/react-native/local-cli/runIOS/runIOS.js:134:8)
at Object.runIOS [as func] (/Users/User/Documents/first-app/node_modules/react-native/local-cli/runIOS/runIOS.js:106:8)
at /Users/User/Documents/first-app/node_modules/react-native/local-cli/cliEntry.js:117:16
我做了以下事情:
我甚至插入了自己的iPhone并运行了react-native run-iso --device=[iPhone name]
但是我收到以下错误:
=== BUILD TARGET first-app OF PROJECT first-app WITH CONFIGURATION Debug ===
Check dependencies
The file “Pods-first-app.debug.xcconfig” couldn’t be opened because there is no such file. (/Users/username/Documents/first-app/ios/Pods/Target Support Files/Pods-first-app/Pods-first-app.debug.xcconfig)
Code Signing Error: No profiles for 'first-app1' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'first-app1'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.2'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
installing and launching your app on iPhone...
** INSTALLATION SUCCEEDED **
如果我不能运行react-native run-ios
命令(对于模拟器或实际设备本身),但我可以运行一个expo客户端模拟器(但是,模拟器中没有应用程序),这一切意味着什么? 我缺少某种依赖吗?
谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.