使用Kingfisher 5.7.1,我无法导入Kingfisher仅用于一个类-UIImageView扩展名。

我可以针对通用的iOS设备进行构建,但如果尝试在模拟器或设备上运行,则会出现导入错误。

我可以导入另一个类,但是每次仍然会给出错误。

swift - Xcode11中Kingfisher的问题-无法为目标“armv7-apple-ios”找到模块“Kingfisher”;找到:arm64,arm64-apple-ios-LMLPHP

swift - Xcode11中Kingfisher的问题-无法为目标“armv7-apple-ios”找到模块“Kingfisher”;找到:arm64,arm64-apple-ios-LMLPHP

我曾尝试取消整合Pod并重新安装。删除派生数据,重新启动Xcode,重新启动计算机。我仍然遇到同样的问题。

import Foundation
import Kingfisher

extension UIImageView {

    public func setImageKF(usingURL url:URL) {
        self.kf.setImage(with: url)
    }

    func layoutImageShadow (shadowImg:UIImageView) {
        snp.makeConstraints { (maker) in
            maker.top.right.equalToSuperview().offset(1)
            maker.width.height.equalToSuperview()
        }
    }
}

最佳答案

如果您查看Kingfisher podspec file,它具有一些最低部署目标:

  s.ios.deployment_target = "10.0"
  s.tvos.deployment_target = "10.0"
  s.osx.deployment_target = "10.12"
  s.watchos.deployment_target = "3.0"


这意味着此pod不能在不能运行iOS 10.0的armv7 devices (iPhone 3GS, 4, 4s, 5, 5c)中运行。

它也不会在模拟32位armv7设备的i386模拟器中运行。

如果尝试在arm64构建配置上运行,则会出现更直接的错误消息:


  针对iOS 9.0进行编译,但模块“ Kingfisher”的最低部署目标为iOS 10.0:

09-10 09:57
查看更多