Xcode 9.3 is released. Swift 4.1 is the language of the land.
When I try to link to RealmSwift 3.0.3 frameworks, I get
'Module compiled with Swift 4.0.2 cannot be imported in Swift 4.1:'
Trying to build realm-cocoa with Xcode 9.3 fails also.
What's the ETA for Swift 4.1 / Xcode 9.3 support?
thanks.
Here is the output when linking to pre-build framework:
Xcode 9.3 : Module compiled with Swift 4.0.2 cannot be imported in Swift 3.3:
realm version : realm-swift-3.3.1
when ?
v3.3.1 is same
after update Xcode to 9.3 that include Swift 4.1
carthage update failed to build, show below error message.
*** Skipped installing realm-cocoa.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2) and the local version is 4.1 (swiftlang-902.0.48 clang-902.0.37.1)."
You can tell Carthage to skip trying to use the prebuilt binary for Xcode 9.2 by passing --no-use-binaries to carthage bootstrap.
I tried to build sources of realm-cocoa latest(v3.3.1) with Swift 4.1 not using carthage.
It is working fine.
I wonder if I should close this issue; after a little head-scratching, it wasn't at all hard to build RealmSwift from source using Xcode 9.3, so maybe it really isn't such an issue, and the Realm guys can deliver us pre-built binaries when they get to it. As to Cocoapods and Carthage, well....I'm starting to think like this
@doncl thanks, I think so it isn't such an issue for me from now on. and I am also trying to work like link that you share. good to read.
1.add this to you projects

2.use Realm.framework

it's work for me !
As of March 30, I still have this issue. I have no idea how to use Carthage :(
Realm 3.3.1 also did NOT solved the issue. There is no swift 4.1
+1, need
I follows this link https://github.com/realm/realm-cocoa#building-realm
When I tried to compile, I get lot of file missing errors :(
Same issue every time there is new version of IOS/Xcode. Is it a time to move to CoreData and not using realm any more?
Any updates on the release for Swift 4.1?
when we will see new update to support Swift 4.1 ?
Hey, Realm-guys, I'd like to say I am competent to build it myself. Well, I am. But when I upload to TestFlight, it complains about a bad Mach-O header.
Yes, I'm lame, I should be able to solve this myself. But I've elected to just wait for you guys to compile it for me.
Pretty Please?
I cannot event compile with out getting errors. I am thinking to move to CoreData
@saham You need to clone the repo then update the submodules as described in the readme. It sounds like an optional step, but this is the way to do it.
@Endanke That's what I get when I run git submodule update --init --recursive
fatal: Not a git repository (or any of the parent directories): .git
I did build from source with Xcode 9.3 and Swift 4.1
and using frameworks(Realm, RealmSwift) is fine
$ git clone https://github.com/realm/realm-cocoa
$ cd realm-cocoa
$ git submodule update --init --recursive
$ sh build.sh ios-swift
Thanks @acehippo
After getting realmswift 4.1, I am getting this error at build time in Xcode (building my app)
bash: PATH_TO_APP/DerivedData//Build/Products/Debug-iphonesimulator/APP_NAME.app/Frameworks/Realm.framework/strip-frameworks.sh: No such file or directory
what's wrong ?
@saham if it's in the DerivedData directory, I suppose you gotta clean build folder?
I did clean/clean build folder. I even manually deleted the folder





Thank you
Make sure you add realm.framework and realmswift.framework to the Embedded Binaries.
Same result :(
I cleared out all of my deprived data and rebuilt and everything worked fine. I still see the error, but it doesn't affect importing any of my dependencies.
Can you run your app on a simulator?
Yep, app is running in the simulator on Xcode version 9.3 (9E145)
Good for you 👍🏻Mine compliments about derived data. I cleaned /cleaned build folder. I even manually deleted the derived data folder. Nothing works for me:(
It's not even working on my device.I blame on what I compiled
@joeblau
Are you able to share your Realm.framework RealmSwift.framework?
Thank you
To the realm team: any ETA on getting the Swift 4.1 version done?
Compile successfully check this
3.3.2 is now out and includes a Xcode 9.3 binary.
@tgoyne Was 3.3.2 built with the correct compiler? I still get
*** Skipped installing realm-cocoa.framework binary due to the error:
[15:23:35]: ▸ "Incompatible Swift version - framework was built with 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2) and the local version is 4.1 (swiftlang-902.0.48 clang-902.0.37.1)."
Using cocoapods, I also still have the error
Cocoapods does not use the prebuilt frameworks and whatever error you're seeing is unrelated to them.
@tgoyne That answer was not directed and me, was it? I'm using Carthage.
Most helpful comment
when we will see new update to support Swift 4.1 ?