How can I easily delete all objects in a Realm

后端 未结 4 2095
轮回少年
轮回少年 2020-12-09 01:41

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)
         


        
4条回答
  •  悲哀的现实
    2020-12-09 02:22

    As of v0.87.0, there is a deleteAllObjects method on RLRealm that will clear the Realm of all objects.

提交回复
热议问题