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

标签 ios swift aws-amplify xcode12

仅针对模拟器进行构建时,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)

下面是我的 podfile

# 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

关于ios - 在 XCode 12 中找不到 x86_64 的符号 - 仅模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63949461/

相关文章:

objective-c - 如何为 ios 中的方法定义默认参数值?

aws-amplify - 模型字段上的 AWS Amplify AppSync @function

amazon-web-services - 此 AWS CloudFormation AWS::Amplify::App 异常 "Invalid request provided: Repository provider not supported."是什么意思?

ios - ios 如何从另一个应用程序调用一个应用程序的方法?

ios - iOS上的xml解析疑惑

ios - 如何在 Objective-C 中使用 NSURLSession 从服务器下载 100 张图像

ios - Swift - 将数据从 CollectionView 传递到 TableViewController

ios - 设置 Swift-Clean 以使用其功能

swift - 不可点击的单元格,wen 动画打开

amazon-web-services - 放大配置不显示任何内容