cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We just wanted to say thank you! Check out our customer appreciation video here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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

Robert S.138
Helpful | Level 7

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.

 

 

1 Reply 1

Greg-DB
Dropbox Staff

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

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?