Factory of objects related to local persistence on SWIFT

Asked

Viewed 50 times

0

In the application I am developing using Swift, I need to have access to a locally persisted data entity, this entity will be built through a Factory based on data obtained probably by a request and return in JSON, through an authentication process on a remote server and stored locally to avoid constant queries.

How to make such local persistence?

1 answer

1


It is recommended to use Coredata to store the data on the device locally. Similarly, the FMDB can be used, or depending on the need, if there are few data to be stored, it can be using Nsuserdefault.

This site has a tutorial divided into four very detailed parts: Core Data in Swift

I hope to help you

  • There would be some example for @Delfino to use?

  • 1

    @David put a tutorial link, thank you for remembering

  • 1

    @David, the project was a proof of concept for a proposal, there were some data that would be read on a qrcode, once obtained, this would be sent to a server that would return more detailed information, therefore such information would be little changed in the course of use, and could be curly, returning only hear change since the last query.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.