UserDefaults scope and limits
A teammate's PR stores the access token, the profile image Data, and an array of 5,000 recently viewed products all in UserDefaults. What would you raise in review?
A teammate's PR stores the access token, the profile image Data, and an array of 5,000 recently viewed products all in UserDefaults. What would you raise in review?
UserDefaults isn't encrypted, and the whole plist sits in memory and gets serialized again on every write, so the token belongs in the Keychain, the image in a file, and the 5,000-item array in a database.
PersistenceMultiple choiceBasics
Select all the pairs where a finance app's storage requirement is matched with the right…
#userdefaults #storage
PersistenceShort answerIntro
A new iOS project has to store a favorites list, the login session, downloaded PDFs, and…
#userdefaults
PersistenceMultiple choiceIntro
Compared with UserDefaults, select all the correct characteristics of the Keychain.
#userdefaults
PersistenceShort answerBasics
Legacy code saves model objects to a file with NSKeyedArchiver, and on recent OS versions…
#plist