Save data to a device

Is there anyone I could save data to a device with Swift, like how we have cookies for browsers?

There are several ways to save data on device.

What type of data do you need to save ?

  • A very simple one is to use User defaults. Did you try ?
  • You can also save as JSON files, very convenient to save objects structures
  • If you have complex data structures, Core Data may be the solution, but it is more complex.
Save data to a device
 
 
Q