Search code examples
iosswiftcocoapodsquickbloxaws-sdk

iOS Build Error Using Quickblox Pod file in AWS Mobile SDK


We have an iOS application that is referencing the AWS Mobile frameworks directly and several other libraries using CocoaPods. The project builds fine

But, when we add the 'Quickblox-SDK' as an additional library to reference in the PodFile and run pod install I get several build/linker errors:

Undefined symbols for architecture x86_64: "_AWSSNSErrorDomain", referenced from: ___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke.239 in AWSMobileHubHelper(AWSPushManager.o) "_OBJC_CLASS_$_AWSSNS", referenced from: objc-class-ref in AWSMobileHubHelper(AWSPushManager.o) "_OBJC_CLASS_$_AWSSNSCreatePlatformEndpointInput", referenced from: objc-class-ref in AWSMobileHubHelper(AWSPushManager.o) "_OBJC_CLASS_$_AWSSNSGetEndpointAttributesInput", referenced from: objc-class-ref in AWSMobileHubHelper(AWSPushManager.o) "_OBJC_CLASS_$_AWSSNSSetEndpointAttributesInput", referenced from: objc-class-ref in AWSMobileHubHelper(AWSPushManager.o) "_OBJC_CLASS_$_AWSSNSSubscribeInput", referenced from: objc-class-ref in AWSMobileHubHelper(AWSPushManager.o) "_OBJC_CLASS_$_AWSSNSUnsubscribeInput", referenced from: objc-class-ref in AWSMobileHubHelper(AWSPushManager.o) "_OBJC_CLASS_$_FBSDKAccessToken", referenced from: objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o) "_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from: objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o) "_OBJC_CLASS_$_FBSDKGraphRequest", referenced from: objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o) "_OBJC_CLASS_$_FBSDKLoginManager", referenced from: objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o) "_OBJC_CLASS_$_GIDSignIn", referenced from: objc-class-ref in AWSMobileHubHelper(AWSGoogleSignInProvider.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

If we remove the $(inherited) flag from the Other Linker Flags build setting, getting below errors:-

bash: /User/..../AWSCore.framework/strip-frameworks.sh: No such file or directory uploadDSYM[13005:219405] Fabric.framework/run 1.4.1 (160) uploadDSYM[13005:219405] Launched uploader in validation mode bash: /Users/..../Frameworks/Quickblox.framework/strip-framework.sh: No such file or directory

Any Help will be appreciated..

Thanks,


Solution

  • in your Pods-{PROJECT_NAME}.debug.xcconfig and Pods-{PROJECT_NAME}.release.xcconfig file, find this line

    OTHER_LDFLAGS = $(inherited) -ObjC -l"z" ....
    

    and remove the -ObjC

    Alternatively, you can also fix this from XCode by going to Build Settings -> Other Linker Flags, and remove -ObjC from there enter image description here