【问题标题】:requires version 4.0.0 or later, but FBSDKCoreKit provides version 1.0.0需要 4.0.0 或更高版本,但 FBSDKCoreKit 提供 1.0.0 版本
【发布时间】:2015-10-24 12:41:50
【问题描述】:

我正在使用 FBSDK cocoapod,并且该应用程序运行得非常好,我没有对应用程序或 xcode 设置进行任何更改,因为它正在工作,现在当我在物理设备上运行时,我收到以下错误:

错误:

dyld:库未加载:@rpath/FBSDKCoreKit.framework/FBSDKCoreKit 引用自:/private/var/mobile/Containers/Bundle/Application/FC27A115-3A03-462B-9980-1189DB1E6578/.app/ 原因:库版本不兼容:需要4.0.0或更高版本,但FBSDKCoreKit提供1.0.0版本 (lldb)

但是我的 pod 文件使用的是 FBSDK 4.4

吊舱:

pod 'FBSDKCoreKit', '~> 4.4'
pod 'FBSDKLoginKit', '~> 4.4'
pod 'FBSDKShareKit', '~> 4.4'

有人知道这里发生了什么吗?我已经尝试过新的 pod 安装,删除 pod 并重新安装,它似乎可以构建到模拟器

【问题讨论】:

    标签: ios cocoapods dyld xcode7-beta4


    【解决方案1】:

    将此脚本添加到我的 podfile 然后运行 ​​pod install 为我解决了这个问题

    post_install do |installer|
        installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['DYLIB_COMPATIBILITY_VERSION'] = ''
            end
        end
    end
    

    希望这对其他人有所帮助,我仍然对任何其他解决方案感兴趣。

    【讨论】:

    • @AndreLuiz 基本上脚本是手动禁用兼容性版本号
    • 我不确定这是否是正确的选择。我刚刚删除了DerivedData 文件夹,它又开始工作了。你不觉得禁用兼容版本号会导致对方依赖的框架版本错误吗?
    • 更新到新版本的 xcode 后,我不再需要 te 脚本,但如果您有更安全的解决方案,请发布答案,以便其他人可以使用它。
    • 显示这个错误he sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-10-01
    • 1970-01-01
    • 2017-05-21
    • 1970-01-01
    • 2016-03-28
    • 1970-01-01
    • 2014-06-04
    相关资源
    最近更新 更多