1

我刚刚升级到 xcode 9,在将翠鸟与以下链接器错误链接时,我的项目失败。我尝试清理 pod 缓存,重新安装所有 pod 文件,在所有 pod 中明确将 swift 语言设置为 3.2,但没有任何效果。

ld: /Users/haha/Library/Developer/Xcode/DerivedData/myproject-awwowqdhnsdvouehdfyrbrdxrhdm/Build/Products/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Kingfisher 使用比以前的文件 (3.0) 更新版本的 Swift 语言 (4.0) 编译用于架构 x86_64 的文件“/Users/haha/Library/Developer/Xcode/DerivedData/myproject-awwowqdhnsdvouehdfyrbrdxrhdm/Build/Products/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Kingfisher”:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

下面是 Podfile

target 'myproject' do

  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks

  use_frameworks!

  # Pods for myproject

  pod 'PlugNPlay', '~> 1.1.0'

  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'

  pod 'GoogleMaps'

  pod 'Kingfisher', '~> 3.13.1'

  pod 'CitrusGraphics', '~> 1.1.2'

  pod 'CitrusPay', '~> 4.1.6'

  target 'myprojectTests' do

inherit! :search_paths

# Pods for testing
end

post_install do |installer|

installer.pods_project.targets.each do |target|

    if target.name == 'Kingfisher'

        target.build_configurations.each do |config|

            config.build_settings['SWIFT_VERSION'] = '3.2'

        end

    end

end

end

end
4

0 回答 0