我正在尝试使用 Expo for EAS 配置一个裸 React Native 项目。这是我到目前为止所做的:
npx install-expo-modules@latest
安装了 Expo 模块。pod install
.react-native run-ios
。但是,构建失败并出现以下错误:
error Failed to build ios project. "xcodebuild" exited with error code '65'. To debug build logs further, consider building your app with Xcode.app, by opening 'AwesomeProject.xcworkspace'.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace AwesomeProject.xcworkspace -configuration Debug -scheme AwesomeProject -destination id=00008130-000260943E8B803A
按照建议,我在 Xcode 中打开 AwesomeProject.xcworkspace 文件并遇到以下消息:
Unsupported Swift Version
The target “AwesomeProjectTests” contains
source code developed with Swift 3.x.
This version of Xcode does not support
building or migrating Swift 3.x targets.
Use Xcode 10.1 to migrate the code to Swift 4.
有趣的是,Android 构建运行良好,并且运行
npx expo run:ios
也可以成功构建所有内容。我很困惑,因为我认为 npx expo run:ios
也会依赖于 Xcode 构建过程。
附加信息:
问题:
react-native run-ios
时会遇到 Swift 版本错误,而在使用 npx expo run:ios
时却不会?react-native run-ios
?任何帮助将不胜感激。谢谢!
我也遇到了这个问题,我向Expo提交了一个问题,希望有答案。