简体   繁体   English

向iPhone应用程序发送数据更新的最佳实践?

[英]Best practice for sending data updates to iPhone app?

I'm currently in the middle of developing an iPhone app with a big reference database (using Core Data backed with a pre-populated sqlite database). 我目前正在开发带有大型参考数据库(使用Core Data和预先填充的sqlite数据库支持的iPhone)的应用程序。 Once the app is live and deployed to a client's iPhone, I need the facility to update/insert a small amount of data. 将应用程序上线并部署到客户端的iPhone后,我需要该工具来更新/插入少量数据。 What are best practices / methods for doing this? 什么是最佳做法/方法?

There may be occassions when the frequency of updates will be daily for a month or so. 有时每天的更新频率会持续一个月左右。 Other occassions when a data update happens once every few months. 每隔几个月进行一次数据更新的其他情况。

What is the recommended way of doing this? 建议这样做的方法是什么? Note, I don't anticipate any data model changes for these updates -- this is purely an insert/update of data. 请注意,我预计这些更新不会对数据模型进行任何更改-这纯粹是数据的插入/更新。

At the moment I'm starting to research the use of push data notifications (q:payload size restrictions?), app store updates (q:code/data model only, not data updates?) and the use of my own ad hoc data server (which the app connects to routinely to check for updates). 目前,我开始研究推送数据通知的使用(q:有效载荷大小限制?),应用商店更新(仅q:代码/数据模型,而不是数据更新?)以及我自己的临时数据的使用服务器(应用程序通常连接到该服务器以检查更新)。

Can anyone please provide me any pointers on the above? 任何人都可以向我提供以上任何指示吗?

Thanks in advance 提前致谢

IIRC Push Notifications have a maximum payload of 256 bytes. IIRC推送通知的最大有效负载为256字节。 Enough for notification purposes, but not more. 足够用于通知目的,但不能更多。 Your app would still have to download the actual data from your own server after receiving the notification. 收到通知后,您的应用仍然必须从您自己的服务器下载实际数据。

Note that the app bundle is not writable on the device. 请注意,该应用捆绑包不可在设备上写入。 So if your app needs to update the data store, you should copy the pre-populated database file from the app bundle to the app's documents directory on first launch. 因此,如果您的应用程序需要更新数据存储,则应在首次启动时将预填充的数据库文件从应用程序捆绑包复制到应用程序的文档目录中。

App Store updates would certainly be feasible (especially now that Apple seems to have gotten its review process down to a few days at most) but note that an App Store update will always replace the entire app bundle (code and data), so if your pre-populated reference database is big, the customer would have to download it in full every time. App Store更新当然是可行的(尤其是现在,Apple似乎最多将审查过程缩短了几天),但请注意,App Store更新将始终替换整个应用程序包(代码和数据),因此如果预填充的参考数据库很大,客户每次都必须完整下载。

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

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