iOS Swift Save|Load Custom Class Variables As Encoded Object

By using NSKeyedArchiver.archivedData, NSKeyedUnarchiver.unarchiveObject you can actually store the data as compressed zip in the device and recall/unzip them to your class structure

Model Class

 

Use With User Defaults (Local Storage)

 

Create the User Class And Store It

 

Published on: 2017/11/23

Leave a Reply

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram