问题描述
直到现在,我更新了我的AWS开发工具包容器,对此我感到非常遗憾.我是在更新Pod时第一次看到的:
Just now, I updated my AWS SDK pods, which I regretted so much. I first saw this when pods were being updated:
dyld:警告,/Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/../../../../Developer/Toolchains中的LC_RPATH @executable_path/../lib/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib在受限程序中由于@executable_path而被忽略
dyld: warning, LC_RPATH @executable_path/../lib in /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib being ignored in restricted program because of @executable_path
dyld:警告,/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/MacOS/Xcode3Core中的LC_RPATH @executable_path/../Framework在受限程序中由于@executable_path
dyld: warning, LC_RPATH @executable_path/../Frameworks in /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/MacOS/Xcode3Core being ignored in restricted program because of @executable_path
然后,当我打开项目并进行构建时,我遇到了太多的构建失败,抱怨同样的事情.类XXX的接口定义重复:
Then when I opened my project and build, I got so many so many build failures, complaining the same thing Duplicate interface definition for class XXX:
我尝试了许多解决方案,重新安装AWS开发工具包pod,重新安装cocoapods,将cocoapods降级到0.38.2,将AWS开发工具包pod降级到2.2.6,但是没有帮助.如果我注释掉Objective-C桥头中的导入,则不会出现这些错误,但是Xcode只会抱怨找不到代码中使用的某些类.但是我不认为将它们注释掉是正确的解决方案.
I have tried many solutions, reinstall AWS SDK pods, reinstall cocoapods, downgrade cocoapods to 0.38.2, downgrade AWS SDK pods to 2.2.6, but none helps. If I comment out the imports in Objective-C bridge header, I don't have these errors but Xcode just complaints about not finding some of the classes used in the codes. But I don't think commenting them out is the right solution.
好吧,我搜索了 https://github.com/CocoaPods/CocoaPods/issues/4302 ,似乎是cocoapods的问题?
Well, I searched https://github.com/CocoaPods/CocoaPods/issues/4302, and it seems it could be cocoapods' problem?
有人对此有任何想法吗?谢谢.
Anyone has any idea on this? Thanks.
推荐答案
答案(希望:))
- 从桥接标头中删除#import
- 在相应的Swift文件中添加导入AWSS3"(或所需的任何类)
说明
从Cocoapods的0.36版本开始,如果它们位于Swift代码中或声明为"use_frameworks!",则无需通过桥接标头导入Pod. (AWS在其版本中 2.2.1
Since version 0.36 of Cocoapods, you don't need to import pods via the bridging header if they are in Swift code OR if they declare "use_frameworks!" (which AWS did in their version 2.2.1
修改
在我的情况下,我将"pod'AWSiOSSDKv2','〜> 2.0'"替换为"pod'AWSS3','〜> 2.2.0'",并在桥接文件中添加了"#import".
In my case, I replaced "pod 'AWSiOSSDKv2', '~> 2.0'" with "pod 'AWSS3', '~> 2.2.0'" and added "#import " in the bridging file.
这篇关于pod更新结果为“类xxx的重复接口定义".适用于所有AWS开发工具包(El Capitan + XCode 7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!