0

I probably do not understand the encryption of Realm propably and hope someone can help.

I created a Realm database with encryption according to this example: https://github.com/realm/realm-cocoa/blob/master/examples/ios/swift-2.0/Encryption/ViewController.swift

 let configuration = Realm.Configuration(encryptionKey: "31234567890123456789012345678901234567890123456789012345678901234".dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false))
 let realm = try! Realm(configuration: configuration)

However after I run my script I can still access & change the Realm file in Realm browser. I expected that the Realm file is encrypted and users cannot read the realm file without decrypting it with the correct password.

I already read question "SWIFT - Realm db encryption not working" but it did not answer my question.

How can I protect my realm file that nobody can read/write Objects from and to it without knowing the encryption key ?

Thanks, Tim

Community
  • 1
  • 1
Style-127
  • 35
  • 6
  • 2
    Are you sure you're opening the right file? I ran the swift 2.0 version of the encryption example from the 0.95.2 release in the simulator, ran `find ~/Library/Developer/CoreSimulator/Devices/ -name '*.realm'` to find the file, and then copied and pasted that path into the version of the browser on the app store, and as expected got an "Invalid database" error. – Thomas Goyne Oct 02 '15 at 17:53
  • THANK YOU!!!!! I just tried it and it works... i don't know what went wrong this afternoon – Style-127 Oct 02 '15 at 19:13

0 Answers0