ios - Realm Swift use locally only, however it still tries to connect online -


i following realm swift getting started guide here , working fine. have following object:

class dog: object {   dynamic var name = ""   dynamic var age = 0 } 

and in viewcontroller have

override func viewdidload() {     super.viewdidload()      print(realm.configuration.defaultconfiguration.fileurl!)      let mydog = dog()     mydog.name = "rex"     mydog.age = 1      let realm = try! realm()      try! realm.write {       realm.add(mydog)     } } 

little snitch reports realm tries connect static.realm.io , api.mixpanel.com. how stop realm attempting connect various servers if want use locally?

it's intended behavior.

realm collects anonymous analytics when app run debugger attached, or when runs in simulator.

please see our doc more details.

https://realm.io/docs/swift/latest/#i-see-a-network-call-to-mixpanel-when-i-run-my-app-what-is-that

it doesn't happen in release build. prevent in debug build, set environment variable named realm_disable_analytics.

see https://github.com/realm/realm-cocoa/blob/master/realm/rlmanalytics.mm#l37-l44


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -