1

在此处输入图像描述在此处输入图像描述在此处输入图像描述在此处输入图像描述我按照 AWS 上的说明进行操作,但在尝试构建应用程序时收到以下错误消息。

该应用程序使用 Swift 3 和 XCode 8.3.3 构建

错误消息是:

"_OBJC_CLASS_$_AWSSNSGetEndpointAttributesInput", referenced from:
  objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)

"_OBJC_CLASS_$_AWSSNSSubscribeInput", referenced from:
  objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)


"_OBJC_CLASS_$_AWSSNSSetEndpointAttributesInput", referenced from:
  objc-class-ref 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_$_AWSSNSUnsubscribeInput", referenced from:
  objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)


"_AWSSNSErrorDomain", referenced from:
  ___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke.235 in AWSMobileHubHelper(AWSPushManager.o)


ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

知道如何解决这个问题吗?

4

3 回答 3

0

AWSMobileHubHelper.framework 应该与应用程序链接。在 XCode 的“链接框架和库”部分添加缺少的框架。

于 2017-06-28T19:52:58.387 回答
0

您只需要在Linked Frameworks and Libraries. 尝试将其从该Embedded Binaries部分中删除。

于 2017-06-29T00:06:26.267 回答
0

好的,所以对我有用的解决方案如下:在 Podfile 中,我添加了以下内容: pod 'AWSCognito' pod 'AWSCognitoIdentityProvider' pod 'AWSLambda' pod 'AWSMachineLearning' pod 'AWSMobileAnalytics' pod 'AWSS3' pod 'AWSSES' pod 'AWSSNS' 您可以添加任何给您错误消息的内容。我已联系 AWS,但在他们的示例页面上没有得到答复。希望这可以帮助某人。

于 2017-06-29T19:27:39.047 回答