-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building Realm with Carthage on Swift 4 #5070
Comments
As far as I know, Xcode 9 packs an updated compiler which can compile 3.2 and 4.0. When an Xcode project/target does not explicitly require version 4, version 3.2 is inferred (which is a kind of compatibility version with very little changes from 3.1). |
To use Realm with Xcode 9 you must build it from source with Xcode 9. This can be done with Carthage with |
As @tgoyne said, this seems to have worked and it built Realm correctly. However getting segementation faults after adding the frameworks to my project. Swift 4 compiler is just really unstable... // Causing nonsensical segfault inside a file which imports RealmSwift
error: 'id' used within its own type
@objc dynamic var id = UUID().uuidString
^
error: could not infer type for 'id'
@objc dynamic var id = UUID().uuidString
^
error: use of undeclared type 'Date'
convenience init(name: String, date: Date, score: Double, associatedRubric: Rubric) { I guess it's just a matter of waiting until this gets resolved by the swift team or wait for Xcode 9 GM, because I've been using Realm with CocoaPods but was having a segfault and loss of highliting every 2 lines of code. Thought maybe using Carthage would help, but it seems to not be working at all... |
If you experience issues with the Swift compiler crashing, please feel free to create minimal reproduction cases and submit them to the Swift JIRA at https://bugs.swift.org. |
You could try installing the latest Swift build. It worked for me! |
Goals
Build Realm with Carthage
Expected Results
Normal carthage build folder is generated with no errors
Actual Results
Error when building Realm with Carthage
Steps to Reproduce
Run
carthage update
with realm as dependency in a Swift 4 xcode project.Code Sample
Not really familiar with Carthage or how it decides which swift version to use. However, I have used other dependencies (my own, which I've updated to Swift 4) and this doesn't seem to be an issue. Is this just a problem with Realm not being fully built for Swift 4 yet or a carthage issue?
Version of Realm and Tooling
Realm framework version: 2.8.3
Xcode version: 9 beta 2
iOS/OSX version: iOS 11.0
Dependency manager + version: Carthage 0.23.0
The text was updated successfully, but these errors were encountered: