You can save the data in the app as the title says. In PHP, unlike this session, it remains semi-permanent unless you delete the app from your device. When I started developing apps from web development, I felt comfortable thinking, "Well, I don't have to use a database even in this case."
UserDefaults.standard.set(Variables and things you want to save, forKey:String)
if UserDefaults.standard.object(forKey:String) != nil {
//If the key is not empty, put it in a variable
variable= UserDefaults.standard.object(forKey:String)
}
As mentioned above, the saved data will be displayed properly even if the app is closed and restarted. Deep emotion!
Recommended Posts