I have followed the steps provided to add the framewowrk from this link https://realm.io/docs/swift/latest/
It gives this error what could be the issue?
Is it because it is compiled with an older version of xcode, since I have the latest xcode 7 beta?
If so, how would I solve this?
You'll have to wait for us to support Swift 2.0 (#2062) before you can use Realm Swift in your Swift 2.0 project.
Because the framework written in Swift which was built in the old version compiler is not able to use in Xcode 7. Therefore, it will be needed to re-build using the compiler of Xcode 7. However, Swift 2 is required on Xcode 7; we are working to adapt RealmSwift.framework to the Swift 2.
I got Realm to work with Swift 2 by doing the following (this is from memory)
/build.sh ios-swift
let realm = try! Realm()
as my initializer in place of let realm = Realm()
I use Carthage for all my frameworks, so to keep things uniform I copied the RealmSwift and Realm frameworks into the carthage/build/ios directory
and the /usr/local/bin/carthage copy-frameworks
build script picks them up
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With