I do not use *.realm file in Document directory of app. I use it in main bundle directory.
When I call it:
NSString *path = [[NSBundle mainBundle] pathForResource:@"example" ofType:@"realm"];
RLMRealm *realm = [RLMRealm realmWithPath:path];
It crashes and logs:
Terminating app due to uncaught exception 'RLMException', reason: 'open() failed: Operation not permitted'