尝试使用ios模拟器运行现有的本机应用程序:react-native run-ios
我已经看过这里,并尝试了所有有用的答案:react-native run-ios can not find any simulator
我还在https://github.com/react-native-community/cli/issues/418和此处https://www.bram.us/2019/09/04/react-native-could-not-find-iphone-x-simulator/处检查了其他github问题是否为react-native,但没有任何内容对我有用。
这是完整的错误日志:
LO60188:appfolder mac$ react-native run-ios
Scanning folders for symlinks in /Users/mac/../../node_modules (10ms)
Found Xcode workspace MyAppName.xcworkspace
CoreData: annotation: Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'
Could not find iPhone 6 simulator
我已经按照建议的解决方案运行了npm audit fix
,尽管模拟器内部没有任何应用,但我现在遇到了构建错误。
The following build commands failed:
CompileC /Users/../../../appfolder/ios/build/CC/Build/Intermediates.noindex/ReactNativeConfig.build/Debug-iphonesimulator/ReactNativeConfig.build/Objects-normal/x86_64/ReactNativeConfig.o /Users/../../../appfolder/node_modules/react-native-config/ios/ReactNativeConfig/ReactNativeConfig.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
然后我尝试了一个特定的iPhone模拟器,但无济于事(与上述相同的构建错误):
react-native run-ios --simulator="iPhone SE"
该项目的反应本机版本为:0.55,但在运行npm audit fix
后更改为0.61.4
与podfile有关吗?正如我必须运行pod init
和pod install
来安装Podfile
任何指导表示赞赏