在 XCode 12 中找不到 x86_64 的符号 - 仅限模拟器

Getting symbol not found for x86_64 in XCode 12 - only Simulator

仅在为模拟器构建时出现 Xcode 12 错误。为真正的建筑 iphone 工作正常。

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_AWSTask", referenced from:
      objc-class-ref in AWSCognitoUserPoolsSignInProvider.o
  "_OBJC_CLASS_$_AWSDDLog", referenced from:
      objc-class-ref in AWSUserPoolSignUpViewController.o
      objc-class-ref in AWSUserPoolsUIOperations.o
  "_OBJC_CLASS_$_AWSServiceConfiguration", referenced from:
      objc-class-ref in AWSCognitoUserPoolsSignInProvider.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

下面是我的播客文件

# Uncomment the next line to define a global platform for your project
platform :ios, '12.2'

target 'chat' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
  #inhibit_all_warnings!

  # Pods for chat
  pod 'AWSCore', '~> 2.9.10'
  pod 'AWSAppSync', '~> 2.10.4'
  pod 'AWSMobileClient', '~> 2.9.10'
  pod 'AWSAuthUI', '~> 2.9.10'
  pod 'AWSUserPoolsSignIn', '~> 2.9.10'
  pod 'AWSS3'
  pod 'SwiftKeychainWrapper'
  pod 'MBProgressHUD'
  pod 'Montserrat'
  pod 'SDWebImage', '~> 5.0'
  pod 'DKImagePickerController'
    #, '~> 4.1.4'
  pod 'SwipeCellKit'
  pod 'GoogleMaps'
  pod 'GooglePlaces'
end

有什么帮助吗?

我 运行 在升级到 Xcode 12 后在项目中遇到了同样的问题。解决它的是 运行 pod deintegrate,然后是 pod install

在我们的案例中,我们有一个项目并将 React Native 集成到其中。大约两周后(昨天)我开始 运行 进入这种情况。所以为了解决它......有点。我所做的是遵循本指南 troubleshooting guide on react native's website 并安装 cocoapods-fix-react-native。按照说明将 plugin 'cocoapods-fix-react-native' 添加到您的 PodFile 非常重要。

之后我 运行 pod deintegrate 然后是 pod install.

所以现在当我在 Xcode 中构建时,一切都是单词,但是如果我清理构建文件夹,我必须执行 pod deintegrate 然后再执行 pod install

有时在构建时,Xcode 挂起,只需停止并重新构建。