我有一个 iOS 应用程序,它直接引用 AWS Mobile 框架和使用 CocoaPods 的几个其他库。该项目构建良好,我能够毫无问题地连接到 AWS。
但是,当我将“PayPal-iOS-SDK”添加为附加库以在 PodFile 中引用并运行 pod install 时,我收到了几个构建/链接器错误:
Undefined symbols for architecture x86_64:
"_AWSSNSErrorDomain", referenced from:
___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke239 in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSLambdaInvoker", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSCloudLogic.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_$_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)
如果我从 Other Linker Flags build设置中删除 -Objcflags,我可以构建但无法引用 PayPal 框架,因为它取决于此设置。
我也尝试过使用 -force_load 而不是 -ObjC,但也没有成功构建它。
我考虑通过直接引用而不是使用 CocoaPods 来集成 PayPal,但这种类型的集成仍然需要 -Objcflags,这会导致与上述相同的错误。
关于在与 PayPal iOS 开发工具包相同的项目中使用 AWS 移动开发工具包有什么想法吗?
删除 -ObjC 其他链接器标志并添加以下其他链接器标志:
-force_load $(SRCROOT)/Pods/PayPal-iOS-SDK/Core/Frameworks/libPayPalMobile.a
关于使用 PayPal 移动 SDK 的 iOS 构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36267569/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://jike.in/) | Powered by Discuz! X3.4 |