I have the choice of doing a migration, but I would prefer to delete everything in my defaultRealm(). How can I do this easily?
realm.deleteObject(object)
>
Things have moved on in the Realm world - in case anyone comes across this now, there is a property that can be set:
Realm.Configuration.defaultConfiguration.deleteRealmIfMigrationNeeded = true
It then does as advertised. (btw: a lot of the syntax above has changed in case you are trying any of the other methods)
The Github PR https://github.com/realm/realm-cocoa/pull/3463