5

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!

Frank
  • 789
  • 4
  • 19
  • Will try to explain further since I think I did not made sense. What I did: - Created a swift project that include some pods like fabric etc. - Created a project on amazon mobile hub and downloaded a sample app to install on my original project. - Copied the Sdk folder that comes with the mobile hub folder that includes some of the AWS frameworks and added them to the embedded binaries. - Copied the AWS folder that includes the AWSMobileHubHelper.framework – Frank Jun 28 '16 at 23:00
  • and added it as linked framework (at this point on my "General" tab on settings, the linked Frameworks are showing all the AWS frameworks, the dos frameworks and the recently include MobileHubHelper framework) - Added a RunScript to the BuildPhases with the strip-frameworks.sh provided by amazon. - Build and fail. – Frank Jun 28 '16 at 23:00
  • 1
    I notice that the failure is related to the Fabric.io libraries.. when removed from the pod file, the app builds. – Frank Jun 29 '16 at 00:34

2 Answers2

13

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.

Frank
  • 789
  • 4
  • 19
2

Have you added $(inherited) to Other Linker Flags? Check by clicking on your project -> build settings -> type in the search bar: Other linker flags and expand Debug and on the right side where you'll see some paths, click on that and set it to $(inherited). Should work.

Mtoklitz113
  • 3,828
  • 3
  • 21
  • 40
  • Yes, it already have `$(inherited)` and there are some paths there that I guess is getting from the pods project. – Frank Jun 28 '16 at 22:42
  • Click on the .h files of your pod and tick their target to your app only. On the right side of Xcode. – Mtoklitz113 Jun 28 '16 at 22:49