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

Viewed 3103

Getting below error with Xcode 12 while building for Simulator only. Building for real iphone works fine.

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)

Below is my 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

Any help please?

2 Answers

I ran into this same issue on a project after upgrading to Xcode 12. What solved it was running pod deintegrate, then pod install.

In our case, we had a project and integrated react native into it. About two weeks later (yesterday) I started running into this situation. So in order to solve it...kinda. What I did is follow this guide troubleshooting guide on react native's website and installed cocoapods-fix-react-native. It is very important to add plugin 'cocoapods-fix-react-native' to your PodFile as per the instructions.

After that I ran pod deintegrate followed by pod install.

So now when I build in Xcode, everything words but if I clean the build folder I have to do a pod deintegrate followed by pod install again.

Sometimes when building, Xcode hangs, just stop and build again.

Related