Is RealmSiwft(3.9.0) support swift 4.2 and Xcode 10?


#1

Hi~

My project use RealmSwift by Carthage, And yesterday I was update Xcode 10.

so now,

My project build is failed.

The build failed message is “Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2 compiler:”

and my Carthage update message is “Incompatible Swift version - framework was built with 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2) and the local version is 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1).”

Is there has any solution?

Thanks.


#2

Hello!

I have the same issue, is there has any solution?

Thanks!


#3

Look at here.


#4

Hello @freeubi, I tried that without success:

$ ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/12.0\ (16A5339e) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
ln: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/12.0 (16A5339e): File exists

$ carthage update
*** Skipped installing realm-cocoa.framework binary due to the error:
“Incompatible Swift version - framework was built with 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2) and the local version is 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1).”

Can I compile it manually? Do you have any other suggestions?

Thanks!


#5

1.) download xCode10
2.) copy from that the Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/12.0 (16A366) directory somewhere. It should contain 2 file.
3.) Open xCode 9.4.1
4.) Copy to the same place the saved directory.
5.) Open project in xCode 9.4.1 and build it.
6.) now you can build for ios12 but in the old xcode - with swift 4.1.2
7.) enjoy


#6

Thanks @freeubi works!


#7

Hi Guys,

I the same issue. Obviously that @freeubi advice a patch, but I aspect from Realm and Carthage to find a solution, because it’s very uncomfortable. The same situation is also in realm-cocoa 3.10.0.

J


#8

They will fix it in the next release. Chill out.
If you can’t wait you still can build it yourself.


#9

Hi, I have already the same issue opened. I’m waiting that in this release to resolve this issue like you wrote. The console file log me

*** Downloading realm-cocoa.framework binary at “v3.11.0”
Incompatible Swift version - framework was built with 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2) and the local version is 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1).

and you can see that I 'm using the last xcode

xcodebuild -version
Xcode 10.0
Build version 10A255

Can you check also you?

J


#10

Did you read my fix?
I dont think so. Check out again the 5th step.


#11

Hi @freeubi,
yes of course. But I want to switch in xcode 10 and this issue is already opened.

J


#12

Then build your own with carthage. Or wait.


#13

But it’s possible know in with release this fix?

J


#14

I just checked.
The lastest RealmSwift and Realm [both v3.11.0] is already supporting the Xcode10 and swift 4.2.


#15

I don’t why but

cat Cartfile.resolved
git “http://review.docomodigital.com/iOSApplications/dmlstore” “6.3.1”
git “http://review.docomodigital.com/iOSApplications/settingsmenu” “2.1.7”
github “ElaWorkshop/TagListView” “1.3.1”
github “onevcat/Kingfisher” “4.10.0”
github “realm/realm-cocoa” “v3.11.0”
github “shima11/FlexiblePageControl” “1.0.7”
github “soffes/CommonCrypto” “v1.1.0”

take me the 3.11.0, the cartage build gives error

J


#16