Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在使用从 Web 服务器生成和下载的数据库覆盖它后,我需要 Core Data 重新加载存储。我在重新加载数据库时遇到了一些麻烦。我尝试在所有上下文和父上下文上调用重置,同时将持久存储协调器、托管对象上下文和托管对象模型设置为零。
我解决了这个问题。我将应用程序委托的属性设置为 nil,但没有将根视图控制器的托管对象上下文设置为 nil 并重新初始化它。