0

I don't quite understand syncing between apps and the web or what I'm meant to do with the data.

You have a website which talks to your iphone app, the app downloads say a JSON file but what changes is it meant to do with the Core data database?

What checks should I be doing? Should I be merging, replacing, inserting data from the JSON file into Core data or assume that the JSON file is always up to date and always do a replace?

This also gets confusing when the app's data is changed. How do you know which is the up to date version and which is not?

Perhaps I am over-confusing it?

4

1 回答 1

0

我应该做哪些检查?我应该将 JSON 文件中的数据合并、替换、插入核心数据,还是假设 JSON 文件始终是最新的并始终进行替换?

只有你才能真正回答这个问题。这取决于您的应用程序做什么以及网站做什么。这取决于数据是什么,谁更新它,以及他们在哪里以及如何更新。你的问题没有一个正确的答案。定义你的应用程序需要做什么以及它如何与这个网站交互,答案就会随之而来。JSON 是最新的吗?可能是,也可能不是——这不是技术问题,而是何时以及如何更改数据的问题。这是驱动您的应用程序和网站的过程的一部分。

于 2013-08-27T16:06:20.640 回答