After updating the Xcode deployment target in my iOS app to iOS 12, several warnings appeared in the Dropbox code. Updating through Cocoapods did not seem to change anything. The source files are all still dated 11-3-2020. I looked in the GitHub repository and the problematic code is still there. Here is one of them.
In DBSDKKeychain.m in the function v1TokensDataIOSCore we see:
NSDictionary *unarchivedFoundData = [NSKeyedUnarchiver unarchiveObjectWithData:foundData];
The warning is that this function is deprecated starting with iOS 12.0. Following the suggestion in Xcode I edited the code to:
NSDictionary *unarchivedFoundData = [NSKeyedUnarchiver unarchivedObjectOfClass:[NSDictionary class] fromData:foundData error:NULL];
I am just guessing that [NSDictionary class] is the right class to use here.
So, will this work? And why hasn't it already been done? After all, iOS12 came out 6 years ago.