LinkedIn SDK重复符号

时间:2015-07-07 01:29:07

标签: ios linkedin cocoapods

我下载了最新的LinkedIn SDK并添加到我的项目中,但构建失败

  

重复符号_OBJC_METACLASS _ $ _ PodsDummy_Pods in:       /linkedin-sdk.framework/linkedin-sdk(Pods-dummy.o)       /Build/Products/Debug-iphonesimulator/libPods.a(Pods-dummy.o)重复符号_OBJC_CLASS _ $ _ PodsDummy_Pods in:       /linkedin-sdk.framework/linkedin-sdk(Pods-dummy.o)       /Build/Products/Debug-iphonesimulator/libPods.a(Pods-dummy.o)ld:2个用于体系结构x86_64 clang的重复符号:错误:链接器   命令失败,退出代码为1(使用-v查看调用)

有谁知道如何修复它?

2 个答案:

答案 0 :(得分:3)

我无法发表评论所以我将此作为对@rinat的回复,我不需要更改其他pod名称,只需添加:

post_install do |installer_representation|
    installer_representation.project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] =     '$(inherited), PodsDummy_Pods=SomeOtherNamePodsDummy_Pods'
        end
    end
end

到pod文件。无论如何,SDK linkedIn对我来说根本不起作用。我无法使其正常工作,在准备好应用程序进行身份验证时,它根本无效。没有日志,没有......我结束了正常的OAuth2网络登录。

答案 1 :(得分:3)

每次通过命令行更新Pod时,无需将 PodsDummy_Pods 名称更改为 PodsDummy_Podsxx ,例如“pod install”或更新等。

粘贴Podfile中的代码。 linkedIn SDK工作很酷......

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited), PodsDummy_Pods=SomeOtherNamePodsDummy_Pods'
        end
    end
end