I'm trying to get Realm ( v2.8.0) to work with Xcode 9 Beta 1. I've tried using Cocoapods and building Realm myself using the sh build.sh build but both solutions lead me to the error:
./scripts/swift-version.sh: line 59: [: =: unary operator expected
Realm to should work with Xcode 9 Beta 1
The current version of Realm does not work with Xcode 9 Beta 1
sh build.sh build. (I'm aware that the prerequisites require me to have Xcode 8.x to build, I'm looking for a way to get Realm to work with Xcode 9 itself)## Code Sample
-
Realm framework version: v2.8.0 ( Manually building: Latest commit 217fb6d)
Realm Object Server version: -
Xcode version: v9.0 (Beta 1)
iOS/OSX version: macOS v10.12.5 (16F73)
Dependency manager + version: cocoapods-1.2.1
Can you please share the output of which sh?
mayur (master *+) realm-cocoa-master $ which sh
/bin/sh
I was able to install no problem through cocoa pods:
pod 'Realm', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'master', submodules: true
pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'master', submodules: true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
However, i did notice the compiler segfault: https://github.com/realm/realm-cocoa/issues/5019 when using LinkedObjects but this is a bug in the Swift compiler it should not be possible to make the compiler crash.
@hishnash Thanks for your response. I got Realm to work with a basic test app.
Also, combined with the post_install do |installer| snippet and the recent Realm 2.8.1 release, I successfully got Realm working with one of my projects.
(Another project still won't work but this issue is resolved.)
I am using Carthage and still need assistance getting Realm Swift 2.8.1 to work in my Xcode 9 project.
Most helpful comment
I was able to install no problem through cocoa pods:
However, i did notice the compiler segfault: https://github.com/realm/realm-cocoa/issues/5019 when using
LinkedObjectsbut this is a bug in the Swift compiler it should not be possible to make the compiler crash.