How to apply encryption on existing realm database
You'll have to create an encrypted copy of the unencrypted Realm file, which you can do by using Realm().writeCopyToPath(_:encryptionKey:)
and then you can use the encrypted file at the new location.