Rebuild binary with latest Xcode to use with Carthage.
Rebuild binary with latest Xcode so Carthage can skip building it everytime.
Carthage downloads current binary, then finds out that it was built using older version so it is rebuilt everytime.
Create Cartfile containing Realm.
github "realm/realm-cocoa"
Jakub-Macbook:ACKReactiveExtensions olejnjak$ carthage update --platform iOS --cache-builds
*** Fetching realm-cocoa
*** Downloading realm-cocoa.framework binary at "v3.0.2"
*** Skipped installing realm-cocoa.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38) and the local version is 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)."
Realm framework version: 3.0.2
Realm Object Server version: N/A
Xcode version: 9.2
iOS/OSX version: N/A
Dependency manager + version: Carthage 0.27.0
same issue.
same
@bdash any insights when Realm can build a swift 4.0.3 framework?
Because of this I'm still using XCode 9.1 while XCode 9.2 has been released a month ago ...
Right I know I want to create a PR which will fix this kind of behavior in Carthage/Carthage#2308. But having a usable prebuilt binary would be nice.
I was hoping that 3.1.0 release would fix that, but I get the same error.
Cartfile
github "realm/realm-cocoa"
then
Jakub-Macbook:Test olejnjak$ carthage update --platform iOS --cache-builds
*** Fetching realm-cocoa
*** Downloading realm-cocoa.framework binary at "v3.1.0"
*** Skipped installing realm-cocoa.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38) and the local version is 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)."
^C
any idea when 3.1.0 is built on 4.0.3?
I'm not sure it is. I tried to open the archive and the RealmSwift-Swift.h says:
// Generated by Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)
And the 4.0.3 version in realm-swift-3.1.0.zip archive just symlinks to 4.0.2 version so I think that might be the cause. I'll try to integrate it manually if it works.
I think it's just a mistake and easy to fix. But the time to fix this is way too long...
@bdash Could you please have a look? This is probably very easy to fix, but causing frustration to people for a month now. The precompiled binary isn't compatible with Swift version 4.0.3.
This will be fixed in our next release, likely some time next week.
Well to be fair this doesn't look like a mistake of the binary, linking it manually from the realm-swift-3.1.0.zip archive seems to work fine (I used the binaries from 4.0.3 folder which is just a symlink to 4.0.2). See the attached example project (https://goo.gl/Fnye4r). So I think this should be the problem of Carthage...
@olejnjak I don't think Carthage could determine that a Swift 4.0.2 binary would be compatible with Swift 4.0.3.
@Zyphrax that's right.
@bdash Are you still planning a new release soon for this problem ? It is so painful ^^ thx
Seems to be really resolved with 3.1.1 :-)
Most helpful comment
I was hoping that 3.1.0 release would fix that, but I get the same error.
Cartfile
then