skip to Main Content

How to replace NSKeyedUnarchiver.unarchiveTopLevelObjectWithData with unarchivedObject when data is a Dictionary – Ios swift

iOS 16.4 deprecates unarchiveTopLevelObjectWithData(_:) and should be replaced with unarchivedObject(ofClass:from:). When you archived a Swift Dictionary like [String: Any], how do you use the newer API to unarchive it? NSKeyedUnarchiver.unarchivedObject(ofClass: [String: Any].self, from: data) results in a build time error:…

VIEW QUESTION
Back To Top
Search