dropbox-sdk-obj-c icon indicating copy to clipboard operation
dropbox-sdk-obj-c copied to clipboard

NSKeyedUnarchiver warnings when running on iOS 15 RC device with Xcode 13 RC on Dropbox 6.2.0 SDK

Open junjie opened this issue 4 years ago • 4 comments

Not sure if these were present before the RC, but I just happened to notice them today:

2021-09-16 11:03:48.381521+0800 Due[2196:205178] [general] *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSString' (0x1dbd2b6e8) [/System/Library/Frameworks/Foundation.framework]' for key 'uid', even though it was not explicitly included in the client allowed classes set: '{(
    "'DBAccessToken' (0x1055c8bc0) [/var/containers/Bundle/Application/ACC66B61-F1CD-46FF-A493-28C6ADBBCB64/Due.app/Frameworks/ObjectiveDropboxOfficial.framework]"
)}'. This will be disallowed in the future.
2021-09-16 11:03:48.382213+0800 Due[2196:205178] [general] *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSString' (0x1dbd2b6e8) [/System/Library/Frameworks/Foundation.framework]' for key 'accessToken', even though it was not explicitly included in the client allowed classes set: '{(
    "'DBAccessToken' (0x1055c8bc0) [/var/containers/Bundle/Application/ACC66B61-F1CD-46FF-A493-28C6ADBBCB64/Due.app/Frameworks/ObjectiveDropboxOfficial.framework]"
)}'. This will be disallowed in the future.
2021-09-16 11:03:48.382358+0800 Due[2196:205178] [general] *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSString' (0x1dbd2b6e8) [/System/Library/Frameworks/Foundation.framework]' for key 'refreshToken', even though it was not explicitly included in the client allowed classes set: '{(
    "'DBAccessToken' (0x1055c8bc0) [/var/containers/Bundle/Application/ACC66B61-F1CD-46FF-A493-28C6ADBBCB64/Due.app/Frameworks/ObjectiveDropboxOfficial.framework]"
)}'. This will be disallowed in the future.

Running iOS 15.0 (19A344) on iPhone XS.

junjie avatar Sep 16 '21 03:09 junjie

Thanks for the report! We'll look into it.

greg-db avatar Sep 16 '21 15:09 greg-db

Do you have an update on this?

It seems that changing lines 71–74 in DBOAuthManager.m to the following fixes the problem:

NSString *uid = [coder decodeObjectOfClass:NSString.class forKey:NSStringFromSelector(@selector(uid))];
NSString *accessToken = [coder decodeObjectOfClass:NSString.class forKey:NSStringFromSelector(@selector(accessToken))];
NSString *refreshToken = [coder decodeObjectOfClass:NSString.class forKey:NSStringFromSelector(@selector(refreshToken))];

goetzf avatar Oct 27 '21 08:10 goetzf

@goetzf I don't have an update on this yet. We'll follow up on this once we do.

greg-db avatar Oct 27 '21 15:10 greg-db

I'm seeing this as well with SDK 6.3.2 on macOS Monterey and Xcode 13

LGriffioen avatar May 10 '22 14:05 LGriffioen

any updates on this? @goetzf 's solution does seem to get rid of the warning, but I'd rather not just unlock and edit the pod files.

I see that there's a pull request for this that's been waiting for a while.

MarkBirch3D avatar Jan 30 '23 19:01 MarkBirch3D

@MarkBirch3D Thanks for the note. This is open with the team, but they haven't addressed it yet. I'll bring it up with them again.

greg-db avatar Jan 30 '23 20:01 greg-db

Seems to be fixed at master by @taylorjcase 🙌

Is there any chance to see an updated podspec soon? I would be happy to make one, but there's most likely some release procedure?

pastey avatar Feb 13 '23 08:02 pastey

@pastey I've asked the team to make a new release with this, and I'll follow up here once that's done.

greg-db avatar Feb 13 '23 17:02 greg-db

This is out with v7.1.1 now.

greg-db avatar Mar 14 '23 19:03 greg-db