使用CLI和Xcode在IOS上构建reactNative应用失败

时间:2020-10-29 03:04:54

标签: ios swift xcode react-native react-native-ios

我试图使用CLI和xcode为ios构建一个简单的reactNative应用程序。 两种构建均失败,并出现不同的错误。 在这两个版本之前,我都运行了以下

npm install
pod install
  1. 使用CLI进行构建 这些步骤是:

    npx react-native run-ios

完成后,我在要附加的日志文件中发现一些错误

    manish.basdeo@AMAC02SNHPHFVH3 Top100 % npx react-native run-ios
info Found Xcode workspace "Top100.xcworkspace"

info Launching iPhone 11 (iOS 13.3)
info Building (using "xcodebuild -workspace Top100.xcworkspace -configuration Debug -scheme Top100 -destination id=37E2E23C-60E2-42D4-8053-525A907ED979")
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening Top100.xcworkspace. Run CLI with --verbose flag for more details.
Build settings from command line:
    TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault

Prepare build
note: Using legacy build system
    
    
    <unknown>:0: error: no such file or directory: '/Users/manish.basdeo/Desktop/Top100/Top100/ios/Pods/@/Users/manish.basdeo/Library/Developer/Xcode/DerivedData/Top100-etyxtwwnmplrdtdxgkmuhxstoudh/Build/Intermediates.noindex/Top100.build/Debug-iphonesimulator/Top100.build/Objects-normal/x86_64/Top100.SwiftFileList'
    Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
    ** BUILD FAILED **
    
    
    The following build commands failed:
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
    (1 failure)

enter image description here 2)使用XCODE构建

enter image description here

enter image description here

如何解决这两个错误?

0 个答案:

没有答案