所以我一直在使用Amazon Web Services构建项目,我决定添加本地存储,所以我添加了podfile' FMDB' (使用此处的教学视频:https://www.youtube.com/watch?v=D5tE61gzIVs)。添加podfile后,我收到以下错误:
Undefined symbols for architecture x86_64:
"_AWSSNSErrorDomain", referenced from:
___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke.239 in AWSMobileHubHelper(AWSPushManager.o)
"_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)
"_OBJC_CLASS_$_AWSS3PreSignedURLBuilder", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSContentManager.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)
其中很多我甚至都没有在我的应用中使用(例如AWSGoogleSignInProvider)。我还试图改变"其他链接标志"通过摆脱-ObjC并添加" -force_load(Framework途径)"对于我正在使用的每个AWS框架。但是当我这样做时,我只得到linker command failed with exit code 1
的错误。我还尝试添加在amazon sdk中找到的所有podfiles(在此处找到:https://github.com/aws/aws-sdk-ios),但仍然存在以下错误:"_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)
。
有人知道我能为此做些什么吗?因为我确实需要利用本地存储以及我的AWS数据库,但我不确定如何解决这些错误。谢谢。
答案 0 :(得分:0)
这看起来像是这里问题的重复......
https://forums.aws.amazon.com/message.jspa?messageID=754901
请尝试以下方法...
如果您使用的是Cocoa Pods,请确保您拥有" use_frameworks!"您的Podfile中的行,就像这样......
platform :ios, '8.1' use_frameworks!target 'MySampleApp' do pod 'whateverpodyouwantgoeshere' end
如果您不使用Cocoa Pod,请确保您的链接器设置与AWS Mobile Hub示例应用程序项目下载中设置的完全相同。
此致
安德鲁C
AWS移动开发人员体验
答案 1 :(得分:0)
打开Pod文件pod-projectname.debug.xcconfig
并从OTHER_LDFLAGS
中删除-ObjC。这解决了这个问题。