Search code examples
iosdatastore

how to store data locally


So i have no idea how to manipulate data effectively. Currently I am querying all my data (messages) from my backend and manipulating it within the view controller file and passing it among view controllers via segues. I realize this is probably ridiculous for a messaging app.

I am thinking of making a separate file called data in order to manipulate the data effectively. The data consists of the message body, object id, sender name, sender id, and time stamp. I was also planning on making custom classes to handle this data.

Would it be best to take this route and how do I effectively manipulate data from other view controllers?


Solution

  • You should use SQLite to save all data.You can create a new table and query all data.It's easy to learn and use.Good luck.