Realm (both Swift and Objective-C libraries) has been updated to version 0.97. Although setDefaultRealmPath was a valid API in the past, it was subsequently deprecated and completely removed from 0.97. Thus, if it worked in the past, after upgrading to 0.97 it will now result in a build error.
Realm file configuration is now controlled using Realm RLMRealmConfiguration objects. To set the default path, you should do it like this:
let directory: NSURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("group.it.fancypixel.Done")! let realmPath = (directory.path! as NSString).stringByAppendingPathComponent("db.realm") var config = RLMRealmConfiguration.defaultConfiguration() config.path = realmPath RLMRealmConfiguration.setDefaultConfiguration(config)
Let me know if you need more clarification!
source share