I am migrating a "NetworkFoundation" Framework, which is based on Alamofire, to Swift 5. Carthage is being used as the dependency manager,
The cartfile looks the following:
github "Alamofire/Alamofire" "5.0.0-beta.5"
The command carthage update
is executed with success. In Xcode the project builds, but when I run the command carthage build --no-skip-current
in the root directory of my framework it fails:
xcodebuild output can be found in /var/folders/1m/qjb4gks13d54rqmn9ptwjmmw0000gp/T/carthage-xcodebuild.bg5VCR.log
Building scheme "Alamofire macOS" in Alamofire.xcworkspace
Building scheme "Alamofire tvOS" in Alamofire.xcworkspace
Building scheme "Alamofire watchOS" in Alamofire.xcworkspace
Building scheme "Alamofire iOS" in Alamofire.xcworkspace
Building scheme "MyNetworkFoundation" in MyNetworkFoundation.xcodeproj
Building scheme "Alamofire iOS" in Alamofire.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/MyUser/Documents/Projects/MyNetworkFoundation/MyNetworkFoundation/Carthage/Checkouts/Alamofire/Alamofire.xcworkspace -scheme Alamofire\ iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/1m/qjb4gks13d54rqmn9ptwjmmw0000gp/T/MyNetworkFoundation SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/MyUser/Documents/Projects/MyNetworkFoundation)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/1m/qjb4gks13d54rqmn9ptwjmmw0000gp/T/carthage-xcodebuild.bg5VCR.log
As recommended, I checked the logfile of the failed build. In there it says:
error: SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0. (in target 'Alamofire iOS') ** ARCHIVE FAILED **
So I checked the Swift Version of my Project which seems to be correct.
Because the logfile states that the Swift Version 3.0 is used in target 'Alamofire iOS', I checked the targets in
/MyNetworkFoundation/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj
but all of them have Swift Version 5. I have no idea what why that error is appearing when I want to build my project. I even tried re-installing Xcode but that did not work either. Anybody got an idea what I am missing?
Xcode Version: 10.2.1 (10E1001) MacOS Version: 10.14.5 (18F132)