Search code examples
ioscore-datareal-time-data

Should I use Core Data for a Real-Time application


I am creating an iOS app which the user can post pictures of ongoing events around. The user can take a snap of the event and put it on the server which will then be featured on the app's feed for everyone to see. I have been reading about core data lately. Core data is for storing persistent data or caching data in offline mode. But in my app, the data (in the form of captured image) has to be uploaded to the backend as soon as the user clicks the snap. So I was wondering, is there any use of using core data in such an application where data caching is not required.


Solution

  • Yes, when a user opens your app and they are offline, you could display your local results retrieved by core data. Then, update these results once you have internet connectivity again. This provides a way for users to see content, even when disconnected.