Moh*_*ANE 4 xcode ios cocoapods rx-swift
我刚刚将Xcode更新到最新版本,项目不再编译。我删除了所有内容并尝试重建 pod,但最终遇到了同样的问题:
[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
导入 RxSwift ^
Ger*_*eon 17
使用 cocoapods 和 Xcode 12,您目前需要在所谓的“安装后挂钩”中设置 Pod 的部署目标。
尝试将其添加到 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
Run Code Online (Sandbox Code Playgroud)
仅供那些可能会遇到与我相同情况的人。这个错误的原因是我正在使用该beta
频道。切换到stable
频道后,我跑了
cd ios/
pod deintegrate
pod cache clean --all
cd ..
flutter clean
Run Code Online (Sandbox Code Playgroud)
而且,我删除了Podfile
和Podfile.lock
。然后,我再次构建了该项目,它成功了!
归档时间: |
|
查看次数: |
6913 次 |
最近记录: |