Xcode 12:针对iOS 10.0进行编译,但是模块"RxSwift"的最低部署目标为iOS 12.0 [英] Xcode 12: Compiling for iOS 10.0, but module 'RxSwift' has a minimum deployment target of iOS 12.0

查看:137
本文介绍了Xcode 12:针对iOS 10.0进行编译,但是模块"RxSwift"的最低部署目标为iOS 12.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将Xcode更新为最新版本,并且该项目不再编译.我删除了所有内容并尝试重建Pod,但最终遇到了与该问题相同的问题:

I just updated Xcode to the latest version, and the project is no longer compiling. I removed everything and tried to rebuild pods but ended up having the same issue this issue:

[x]/Users/alouanemed/Projects/App-iOS/Pods/_Prebuild/Moya/Sources/RxMoya/MoyaProvider+Rx.swift:2:8:针对iOS 10.0进行编译,但模块"RxSwift"的部署最少iOS 12.0的目标:/Users/alouanemed/Projects/App-iOS/Pods/build/Release-iphoneos/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/arm64-apple-ios.swiftmodule

[x] /Users/alouanemed/Projects/App-iOS/Pods/_Prebuild/Moya/Sources/RxMoya/MoyaProvider+Rx.swift:2:8: compiling for iOS 10.0, but module 'RxSwift' has a minimum deployment target of iOS 12.0: /Users/alouanemed/Projects/App-iOS/Pods/build/Release-iphoneos/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/arm64-apple-ios.swiftmodule

导入RxSwift^

import RxSwift ^

推荐答案

使用cocoapods和Xcode 12,您当前需要在所谓的安装后挂钩"中设置Pods的部署目标.

With cocoapods and Xcode 12, you currently need to set your Pods' deployment targets in a so-called "post-install hook".

尝试将其添加到Podfile的末尾:

Try adding this to the end of your Podfile:


deployment_target = '12.0'

post_install do |installer|
    installer.generated_projects.each do |project|
        project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
            end
        end
        project.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
        end
    end
end

这篇关于Xcode 12:针对iOS 10.0进行编译,但是模块"RxSwift"的最低部署目标为iOS 12.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆