> On 20 Dec 2017, at 01:25, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> You’ll have to figure out what type to use for the Ints. If they were 
> actually saved compatibly with Obj-C, the Ints will actually be NSNumbers, 
> and you’ll need to say “NSNumber.self”. If the Ints are stored opaquely as 
> Ints, I guess it would be Int.self. You should be able to figure out the 
> right type by trial and error, I’d say.
> 
> (Actually, if the array itself was saved opaquely, then you’ll need something 
> like [[Int].self], I guess. This is an area subject to automatic bridging, so 
> what you get depends on the exact code used to encode the archive.)

The array is saved as an array of Ints, not NSNumbers

coder.encode(arrayOfInts, forKey: kArrayKey)

Jeremy

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to