• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSSecureCoding & Nested Collections & macOS 11
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSecureCoding & Nested Collections & macOS 11


  • Subject: Re: NSSecureCoding & Nested Collections & macOS 11
  • From: Markus Spoettl via Cocoa-dev <email@hidden>
  • Date: Sat, 5 Sep 2020 20:14:00 +0200

On 9/3/20 12:15 PM, Markus Spoettl via Cocoa-dev wrote:
On macOS 11 this produces the following exception:

------------------------------
-[NSKeyedUnarchiver _validateDecodeCollectionAllowedClassesRequirementsWithClasses:]: This method only supports decoding non-nested collections. Please remove the following or use '-decodeObjectOfClasses: forKey:' instead:
     (
         NSDictionary (0x7fff88714520)
[/System/Library/Frameworks/CoreFoundation.framework]
     )
------------------------------

It Was All Our Fault (tm), surprisingly :)

Turns out we have an NSCoder extension that helps with secure coding and
declares

- (NSArray *)decodeArrayOfObjectsOfClasses:(NSSet <Class> *)classes
forKey:(NSString *)key

Apple must have seen it because the exact same method is not in NSCoder directly. Apparently the collision wasn't resolved to call the new instance method, but something else (probably -decodeObjectForKey:).

Changing the extension's method name(s) to something more unique fixed the
problem.

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSSecureCoding & Nested Collections & macOS 11 (From: Markus Spoettl via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: NSSecureCoding & Nested Collections & macOS 11
  • Next by Date: App store question regarding Big Sur
  • Previous by thread: Re: NSSecureCoding & Nested Collections & macOS 11
  • Next by thread: App store question regarding Big Sur
  • Index(es):
    • Date
    • Thread