Archiving and plists
Legacy code saves model objects to a file with NSKeyedArchiver, and on recent OS versions unarchiving started warning and crashing. What's the difference between NSCoding and NSSecureCoding?
Legacy code saves model objects to a file with NSKeyedArchiver, and on recent OS versions unarchiving started warning and crashing. What's the difference between NSCoding and NSSecureCoding?
NSSecureCoding makes you name the allowed classes when you decode, which blocks arbitrary object injection. The unarchiving APIs are secure by default now, so they fail when you don't give the class list.
PersistenceShort answerBasics
In the Objective-C days, YYModel and MJExtension turned JSON into models and even handled…
#nssecurecoding #codable
PersistenceShort answerIntro
A teammate's PR stores the access token, the profile image Data, and an array of 5,000…
#plist
NetworkingShort answerIntro
The server responds with something like {"user_id": 3, "created_at"…
#codable
NetworkingShort answerBasics
You're decoding responses into the model below with Codable, but the server includes the…
#codable