Save user data (name, info, image)

I am working on a food tracking app. The user will be able to enter the name of a meal, upload an image of the meal, add a rating, save ingredients, add a recipe, and add the calorie count.


I have prototyped my app by saving the name of meals to UserDefaults as an array, but that won't work for this amount of data.


How could I save all of this to the device, and be able to programmatically show it all (e.g. randomly pick a saved meal and show its corresponding info)?


I'm quite new to Swift so I apologise if this is a bit vague, but I hope someone will be able to help me here.


Thanks so much in advance and I hope you're all well!

There are multiple options to save data persistent on the device.
  • user settings

  • write to files

  • database

  • core data with different underlaying storing options

  • documents

  • etc.

It all depends on the data you want to save and the amount of data.

If there will be thousands of records you probably want to use a database or core data.

Save user data (name, info, image)
 
 
Q