简体   繁体   English

核心数据丢失记录iPhone

[英]core data missing records iphone

I have a strange and serious problem. 我有一个奇怪而严重的问题。

When I am working with core data (not saving or editing or anything) just accessing the data from entity. 当我使用核心数据(不保存或编辑任何内容)时,只需从实体访问数据即可。

Sometime strangely a few records or all records are missing(deleting) from the entity when my application restarts. 有时,奇怪的是,当我的应用程序重新启动时,实体中的一些记录或所有记录都丢失了(删除)。

I checked them by opening the SQLite database. 我通过打开SQLite数据库检查了它们。

Can anyone have the same problem ? 谁能遇到同样的问题?

Thanks, Raghu 谢谢,拉古

I was having a similar problem today. 我今天也遇到类似的问题。 It turned out I had some code for inserting test data (for debugging) that had been uncommented and it was clearing and re-filling the database with the test data every time the app started. 事实证明,我有一些代码可以插入未注释的测试数据(用于调试),并且每次应用程序启动时,都会使用测试数据清除并重新填充数据库。 It sounds to me like you're having a media issue where the storage space is actually corrupting from time to time. 在我看来,您遇到了媒体问题,其中的存储空间实际上不时在损坏。 Did you get it fixed? 你修好了吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM