I am using realm-cocoa(v1.0.1) with a Swift 2.0 project (need objective-c interoperability) and am having trouble overriding the linkingObjectsProperties method.
I've followed the Realm documentation (https://realm.io/docs/objc/latest/#inverse-relationships) and defined my function override in my RLMObject subclass as follows:
override class func linkingObjectsProperties() -> NSDictionary {
return ["owners": RLMPropertyDescriptor(withClass: Person.self, propertyName: "dogs")]
}
The compiler then complains, saying "Method does not override any method from its superclass".
If I prefix the definition with @objc, the error changes to "Overriding method with selector 'linkingObjectsProperties' has incompatible type '() -> NSDictionary'
Any ideas?
Thanks!