We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Robert S.138's avatar
Robert S.138
Helpful | Level 7
2 years ago

Objective-C Dropbox SDK warnings with iOS 12 as deployment target

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.

 

 

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    20 days ago

    I don't have an update on this currently. I'll follow up here once I have any news.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Thanks for the report! I'll ask the team to look into this and update it accordingly.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,035 PostsLatest Activity: 2 years ago
410 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!