应用程序更新,将数据插入到coredata中,同时保留不带modelchange的userdata [英] Application update, insert data in coredata while preserving userdata without modelchange

查看:109
本文介绍了应用程序更新,将数据插入到coredata中,同时保留不带modelchange的userdata的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我的应用程式发布更新。



我不明白如何更新现有的核心资料库,也储存使用者输入的资料。
我需要做的是更新几个记录并保存当前用户数据。

解决方案


$ b 编写一个代码块执行更新,并设置用户首选项值( NSUserDefaults )当你这样做。在新版本中加入该代码,先检查偏好设置。


I want to release an update for my app.

I'm stuck on how to update the existing core data database which also stores data entered by the user. All i need to do is update a couple of records and preserve current user data. No changes are made to the model.

Thanks.

解决方案

Write a chunk of code that performs the update, and set a user preference value (NSUserDefaults) when you have done so. Include that code in your new version, checking the preference value first.

这篇关于应用程序更新,将数据插入到coredata中,同时保留不带modelchange的userdata的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆