Imagine there is cooking app that the user can create their own recipes. The app is integrated with Firebase and gets the core data from Firebase. In a view, I let the user to create the recipe. So user will input name, ingredients with their sizes and equipment. Somehow I need to store this data to use it within the View and then save it on Firebase once the user press the save button. How can I store this data temporarily? The data will be something like the below example. A mixture of arrays and objects.
{
"User": 124213,
"RecipeName": "Some Name",
"createdDate": "Some Date",
"Ingredients": [
{
"ingredient": 123,
"size": 3
},
{
"ingredient": 234,
"size": 3
},
{
"ingredient": 294,
"size": 2
},
{
"ingredient": 736,
"size": 2
},
{
"ingredient": 150,
"size": 4
}
],
"Equipment": [
[ 123, 234 ],
[ 294, 736 ]
]
}
I dont know how developer deal with such situation where they need to keep data temporarily on IOS before sending it to Firebase.
Any idea or suggestion is appreciated.