© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
W. WangPro iPhone Development with SwiftUIhttps://doi.org/10.1007/978-1-4842-7827-7_6

6. Understanding Data Persistence

Wallace Wang1  
(1)
San Diego, CA, USA
 

All but the simplest apps need to store data. The Stocks app lets users track their favorite stocks, so it needs to store the list of stocks to follow that the user chose. Each time the user launches the Stocks app again, it displays the list of stocks the user inputted previously. If the user adds or deletes stocks from this list, the Stocks app needs to store this updated list and retrieve it again the next time the user loads the Stocks app.

Other types of apps may have various settings that allows ...

Get Pro iPhone Development with SwiftUI: Design and Manage Top Quality Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.