How to remove a core data persistent store

后端 未结 3 1040
终归单人心
终归单人心 2021-02-06 10:19

I need to delete my persistent store (doing it object by object is not practical because I have over 100,000 objects). I\'ve tried this:

- (IBAction)resetDatabas         


        
3条回答
  •  情话喂你
    2021-02-06 10:50

    You need to make sure that any managed object context attached to the persistent store have been released before you try to delete the store. Otherwise, the context will evoke that error.

提交回复
热议问题