Search code examples
iosswiftcocoapodsamazon-mobile-hub

CocoaPods AmazonMobileHub Undefined symbols for architecture x86_64


I have a cocoa pods Swift project and Im trying to install the Amazon AWS Mobile Hub frameworks, copied the Sdks and the MobileHubHelper framework but is not building.

The error goes like this:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_AWSLambdaInvoker", referenced from:
      objc-class-ref in AWSMobileHubHelper(AWSCloudLogic.o)
  "_OBJC_CLASS_$_AWSS3", referenced from:
      objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
     (maybe you meant: _OBJC_CLASS_$_AWSS3ContentProvider)
  "_OBJC_CLASS_$_AWSS3GetPreSignedURLRequest", referenced from:
      objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
  "_OBJC_CLASS_$_AWSS3ListObjectsOutput", referenced from:
      objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
  "_OBJC_CLASS_$_AWSS3ListObjectsRequest", referenced from:
      objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)

From what I found it looks like it is not encourage to use the public SDKs with the mobile hub framework but to copy the ones given with the sample app but either way it does not work.

Any ideas will be appreciated. Thanks!


Solution

  • Turns out that if you go to the Pods folder in your project and update the Pods-.debug.xcconfig and Pods-.release.xcconfig OTHER_LDFLAGS by removing the -ObjC param after ($inherited) the project builds and run.