SWIFT - Realm db encryption not working
Im trying to encrypt the data stored in the realm database. I followed the Sample Code mentioned on Realm's Swift page . I want to encrypt the data NOT the database file. Below is the code I'm using: var error: NSError? = nil let configuration = Realm.Configuration(encryptionKey: EncryptionManager().getKey()) if let realmE = Realm(configuration: configuration, error: &error) { // Add an object realmE.write { realmE.add(objects, update: T.primaryKey() != nil) } } Where objects is a list of objects i need to insert in the database. Below is the code fore getKey() func also picked from the sample