Best practice to sync webservice with offline storage on iOS
Asked Answered
I

1

8

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?

Ignitron answered 13/6, 2013 at 13:22 Comment(1)
Have you looked at RestKit?Haematic
C
3

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.

Cathar answered 13/6, 2013 at 14:36 Comment(1)
I am looking into RestKit.. do you have any good tutorials on using it with Core Data?Ignitron

© 2022 - 2024 — McMap. All rights reserved.