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: 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
import RxSwift ^
To change your deployment target, open up your project file in Xcode and check the setting under Build Settings -> Deployment(...) Check this answer to add earlier devices support.
In short, every application that runs on one of Apple's platforms has a deployment target. A deployment target is nothing more than the minimum version of the operating system the application can run on. Fire up Xcode and create a new project by choosing the App template from the iOS > Application section.
Click on pods. Select each project and target and click on build settings. Under Deployment section change the iOS Deployment Target version to anything more than 8.0 (better to try the same project version). Repeat this for every other project in your pods then run the app.
The release notes for Xcode 12 beta state that the release “supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later.” I am not sure if that means support for building and deploying for iOS 8 is completely removed, but it sounds like it.
If you are using CocoaPods with Xcode 12 beta, then you have probably seen this error: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99.
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. This is happening because support for iOS 8 has been dropped, but the minimum deployment target for the pod is iOS 8.
This is happening because support for iOS 8 has been dropped, but the minimum deployment target for the pod is iOS 8. This older GitHub issue on CocoaPods discusses this a bit, as well as this recently opened issue. Note that even if your minimum deployment target is greater than iOS 8, you will still see this error.
With cocoapods and Xcode 12, you currently need to set your Pods' deployment targets in a so-called "post-install hook".
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
Just to people who may end up in the same case as me. The reason of this error was that I was using the beta
channel. After switching to the stable
channel, I ran
cd ios/
pod deintegrate
pod cache clean --all
cd ..
flutter clean
And, I removed the Podfile
and the Podfile.lock
. Then, I built the project again and it worked!
You are tying to import a version of RxSwift
that has already set its minimum deployment target to iOS 12.0 while your project itself is still on iOS 10.0.
This should not be related to Xcode or the Xcode update.
If you can post your Podfile we can verify this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With