Hi,
I just had to update an app that was last build with Xcode 11.7. Dependencies are handled using Carthage. Now I'm running Xcode 12.2 and ReSwift is giving me problems. If I try:
❯ carthage update ReSwift --platform iOS
I get:
* Fetching appcenter-sdk-apple
Fetching ReSwift
Checking out ReSwift at "6.0.0"
xcodebuild output can be found in /var/folders/7h/z6br6qn52f3ff3fz30l0b9rw0000gn/T/carthage-xcodebuild.E7Ynmi.log
Downloading ReSwift.framework binary at "6.0.0"
* Skipped installing ReSwift.framework binary due to the error:
"Incompatible Swift version - framework was built with 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1) and the local version is 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)."
Falling back to building from the source
* Building scheme "ReSwift-iOS" in ReSwift.xcworkspace
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/myuser/Library/Caches/org.carthage.CarthageKit/DerivedData/12.2_12B45b/ReSwift/6.0.0/Build/Intermediates.noindex/ArchiveIntermediates/ReSwift-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ReSwift.framework/ReSwift /Users/myuser/Library/Caches/org.carthage.CarthageKit/DerivedData/12.2_12B45b/ReSwift/6.0.0/Build/Products/Release-iphonesimulator/ReSwift.framework/ReSwift -output /Users/myuser/Developer/Projects/myapp/Carthage/Build/iOS/ReSwift.framework/ReSwift
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/7h/z6br6qn52f3ff3fz30l0b9rw0000gn/T/carthage-xcodebuild.E7Ynmi.log
As I read this, the version of Swift has changed from 5.3 to 5.3.1 so I cant download a matching ReSwift binary. Instead Carthage tries to build from source. However, this also fails. When I check the build log I don't see any errors and the file ends with:
...
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp\=none /Users/myuser/Library/Caches/org.carthage.CarthageKit/DerivedData/12.2_12B45b/ReSwift/6.0.0/Build/Products/Release-iphonesimulator/ReSwift.framework
* BUILD SUCCEEDED *
How do you normally fix this error? Simply by using an older version of Xcode, or?!
Any info is highly appreciated!
Kind regards,
Anders Sejersbøl
Hey, in my project I use ReSwift from master (although I recommend you to use the released versions instead as you do) using Carthage without any problems.
Make sure you use Carthage's workaround for Xcode 12 because it could be related to your problem.
Hi @dani-mp
Thank you! I was not aware that there was a problem with Carthage and Xcode 12. I followed the description in your link, and it worked 🎉
Kind regards,
Anders Sejersbøl
Most helpful comment
Hi @dani-mp
Thank you! I was not aware that there was a problem with Carthage and Xcode 12. I followed the description in your link, and it worked 🎉
Kind regards,
Anders Sejersbøl