使用 PayPal 移动 SDK 的 iOS 构建错误
<p><p>我有一个 iOS 应用程序,它直接引用 AWS Mobile 框架和使用 CocoaPods 的几个其他库。该项目构建良好,我能够毫无问题地连接到 AWS。</p>
<p>但是,当我将“PayPal-iOS-SDK”添加为附加库以在 PodFile 中引用并运行 pod install 时,我收到了几个构建/链接器错误:</p>
<pre><code> Undefined symbols for architecture x86_64:
"_AWSSNSErrorDomain", referenced from:
___88-_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)
</code></pre>
<p>如果我从 Other Linker Flags build设置中删除 -Objcflags,我可以构建但无法引用 PayPal 框架,因为它取决于此设置。</p>
<p>我也尝试过使用 -force_load 而不是 -ObjC,但也没有成功构建它。</p>
<p>我考虑通过直接引用而不是使用 CocoaPods 来集成 PayPal,但这种类型的集成仍然需要 -Objcflags,这会导致与上述相同的错误。</p>
<p>关于在与 PayPal iOS 开发工具包相同的项目中使用 AWS 移动开发工具包有什么想法吗? </p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>删除 -ObjC 其他链接器标志并添加以下其他链接器标志:</p>
<pre><code>-force_load $(SRCROOT)/Pods/PayPal-iOS-SDK/Core/Frameworks/libPayPalMobile.a
</code></pre></p>
<p style="font-size: 20px;">关于使用 PayPal 移动 SDK 的 iOS 构建错误,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/36267569/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/36267569/
</a>
</p>
页:
[1]