Now I get error Property types for \'value\' property do not match. Old type \'float\', new type \'double\'
How to clear database or migrate is successfully?
Swift 4.2 To remove database:
func remove(realmURL: URL) {
let realmURLs = [
realmURL,
realmURL.appendingPathExtension("lock"),
realmURL.appendingPathExtension("note"),
realmURL.appendingPathExtension("management"),
]
for URL in realmURLs {
try? FileManager.default.removeItem(at: URL)
}
let url = Realm.Configuration.defaultConfiguration.fileURL!
remove(realmURL: url)
To clear database:
try? realm.write {
realm.deleteAll()
}