FloppyUser
FloppyUser

Reputation: 1

Realm, Swift and App Sandbox not working?

I can't get Realm (lastest version), Swift and Sandboxing to work.

I created a Hello Word app with RealmSwift / Realm embedded binaries included correctly.

import RealmSwift 

..add one class and only the line:

let realm = try! Realm ()

Then I got this error when I run the app:

*2016-08-17 21:04:05.404 testprosjekt1[37407:21624950] ***storageTaskManagerExistsWithIdentifier:withIdentifier failed: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.nsurlstorage-cache was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.nsurlstorage-cache was invalidated.}; {
    NSDebugDescription = "The connection to service named com.apple.nsurlstorage-cache was invalidated.";
}
2016-08-17 21:04:05.412 testprosjekt1[37407:21624950] ***cachedResponseDictionaryForRequest:key:handler failed: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.nsurlstorage-cache was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.nsurlstorage-cache was invalidated.}; {
    NSDebugDescription = "The connection to service named com.apple.nsurlstorage-cache was invalidated.";*
}

If I turn off sandboxing - I got NO error at all. So, my question is: Is the latest version of Realm NOT working with sandboxed apps?

Upvotes: 0

Views: 296

Answers (1)

Dmitry
Dmitry

Reputation: 7340

Realm works well with sandboxing (until you try to reader or write to a directory you don't have access to).

Realm collects anonymous analytics and checks for updates when your app is run with a debugger attached, or when it runs in a simulator. This call does not run when your app is in production, or running on your user’s devices. See more at FAQ.

Also if you perform any network calls in your app add com.apple.security.network.client to your entitlement (or simply enable Outgoing connection (Client) in Capabilities tab of your project's settings).

Upvotes: 1

Related Questions