New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
carthage update --platform ios . error #144
Comments
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'RxAlamofire iOS') |
@rynecheow Any idea ? |
xcode 10.1 |
Is there any way to resolve it? |
I got exactly the same error I am with swift 4.2 and RxAlamofire version 4.4.0 Does any one found a solution? |
I took a quick look at the issue today @freak4pc. So the problem is that the .xcodeproj is using Swift 5.0, but the .podspec is saying that CocoaPods should use Swift 4.2 to build the library. So, CocoaPods users will use this lib with Swift 4.2 and Carthage users will use it with Swift 5.0. Because of that, CocoaPods users will easily use this lib in Xcode 10.1/2 but Carthage users will unfortunately need Xcode 10.2 for it to build. As I'm in no position to know which direction should RxAlamofire take I will point out most likely directions:
The first one would be the easiest solution for y'all here that can't install the new RxAlamofire version in your projects. The second one will be easier for maintainers here as it's pretty empty lately. In any case, if you guys want to resolve it by yourself now, there is a way: carthage update RxAlamofire --platform iOS --no-build
sed -i -e 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = 4.2/g' Carthage/Checkouts/RxAlamofire/_.xcodeproj/project.pbxproj
carthage build RxAlamofire --platform iOS This fetches the project, updates the Swift version for xcodeproj (that Carthage uses) and builds it with Swift 4.2. Let me know if it works @apparence @afeng159. Note: CI has integration checks for Swift 4.2 as well as Swift 5.0, so lowering down Swift version for Carthage users could be a good way for at least version 4.* of RxAlamofire. |
Thanks @sunshinejr for taking a look! I did the original pull request to support Swift 5 but unfortunately I've been tied up. I agree on the solutions and I'd say in the longer term, option 2 would be the more viable solution. |
If we raise the minimum to Swift 5, let’s wait for RxSwift 5. It’s supposed to be released over the next week or two. |
Thanks a lot @sunshinejr works like a charm ! |
I agree @freak4pc. This way RxAlamofire could be upgraded to 5.0.0 as well. For the time being, it might be a good idea to update the xcodeproj to use Swift 4.2 and make a patch release as CocoaPods and CI is prepared for 4.2 anyways. |
@rynecheow Can you take care of this? We can release RxAlamofire 4.5.0 that only supports Swift 4.2 and RxAlamofire 5 which will work against RxSwift 5 and thus support only Xcode 10.2 and above (e.g. only the Swift compiler). |
Building scheme "RxAlamofire iOS" in .xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/chenxufeng/Documents/work/apub-companion-ios/Carthage/Checkouts/RxAlamofire/.xcodeproj -scheme RxAlamofire\ iOS -configuration Release -derivedDataPath /Users/chenxufeng/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/RxAlamofire/4.4.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/q3/6zscgh7134d_b15cxfkrqpfw0000gn/T/RxAlamofire SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/chenxufeng/Documents/work/apub-companion-ios/Carthage/Checkouts/RxAlamofire)
The text was updated successfully, but these errors were encountered: