I am trying to set the default Realm path to App Groups directory.
let directory: NSURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("groups.prasanna.appName")!
RLMRealm.setDefaultRealmPath(directory.absoluteString!)
println(RLMRealm.defaultRealmPath())
The app crashes with the following error
Terminating app due to uncaught exception 'RLMException', reason: 'open() failed: Operation not permitted'
How do I fix this issue?