NSKeyedArchiver + NSKeyedUnarchiver deprecated

My Objective-C app contains several hundreds lines of deprecated code like these:

NSData *tmp = [NSKeyedArchiver archivedDataWithRootObject:singleTaskCleanUserArrayItem]; singleTaskUserArrayItem = [NSKeyedUnarchiver unarchiveObjectWithData:tmp];

New recommended methods: +archivedDataWithRootObject:requiringSecureCoding:error: +unarchivedObjectOfClass:fromData:error:

How to implement the new methods in Objective-C? Forums and Documentation refer to Swift but not to Objective-C. Please give me a sample code for the two lines of code

Best regards, Gerhard

Answered by DTS Engineer in 787549022

I’m gonna start you off with this thread. Let me know if you get stuck.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

I’m gonna start you off with this thread. Let me know if you get stuck.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

NSKeyedArchiver + NSKeyedUnarchiver deprecated
 
 
Q