swift - Xcode11 中的 Kingfisher 问题 - 无法找到目标 'Kingfisher' 的模块 'armv7-apple-ios' ;发现 : arm64, arm64-apple-ios

标签 swift cocoapods xcode11 kingfisher

使用 Kingfisher 5.7.1,我无法仅为一个类(UIImageView 扩展)导入 Kingfisher。

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

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

Building for device

Building for simulator

我尝试过取消集成 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 不会在 armv7 devices (iPhone 3GS, 4, 4s, 5, 5c) 中运行无法运行 iOS 10.0。

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

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

Compiling for iOS 9.0, but module 'Kingfisher' has a minimum deployment target of iOS 10.0:

关于swift - Xcode11 中的 Kingfisher 问题 - 无法找到目标 'Kingfisher' 的模块 'armv7-apple-ios' ;发现 : arm64, arm64-apple-ios,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58083024/

相关文章:

ios - 如何在 SWIFT 的 Objective-C 中替换 #define 宏?

ios - 删除 pod( cocoa pod )后出现 Apple Mach-O 链接器错误

Swift 运行时库与 Swift 标准库

ios - UIView 即使在开始从 superview 中移除后也会重新出现

ios - 重新打开应用程序时出现关系故障

swift - 具有依赖项的 CocoaPods 框架 - 在框架模块中包含非模块化 header

ipad - 当多个连接的场景在前台处于事件状态时获取当前聚焦的 UIScene

swift - 在 Xcode11Beta 中使用 SwiftUI 的 TabbedView (11M336w)

swift - Xcode 11 beta 3 上的 UIAction 语法

ios - 检查 UITextfield 是否处于事件状态