I have been working on a few iOS applications that talk to a REST API on the web server and than sync some data down for offline usage. The app then stores data locally if network connection is not available and than syncs with backend whenever the Internet connection is available.

I am wondering if there is a nice pattern or set of rules or library that can be used. I would rather not code this again and again. I know the business logic / sync logic would be different for each app but the rest of the work (ie. storing it locally, calling REST API) can be abstracted out.

Any ideas?

有帮助吗?

解决方案

I use the RestKit framework in my app for the exact scenario you describe. The downloaded data are stored in a Core Data store for offline usage.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top