From 6d9515daeb002d3e1526352782242430a4afa464 Mon Sep 17 00:00:00 2001 From: Tony Parker Date: Wed, 20 Jul 2016 15:39:08 -0700 Subject: [PATCH] NSCoder encodeInt:forKey cannot be overridden in Swift, throws runtime exception --- apinotes/Foundation.apinotes | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/apinotes/Foundation.apinotes b/apinotes/Foundation.apinotes index 5b57eb7c739c0..4ea5208af0820 100644 --- a/apinotes/Foundation.apinotes +++ b/apinotes/Foundation.apinotes @@ -160,6 +160,28 @@ Classes: - Selector: 'notificationCenterForType:' MethodKind: Class FactoryAsInit: C +- Name: NSKeyedArchiver + SwiftName: NSKeyedArchiver + Methods: + - Selector: 'encodeInt:forKey:' + Availability: nonswift + AvailabilityMsg: Use 'encodeInt32(_:forKey:)' instead + MethodKind: Instance + - Selector: 'decodeIntForKey:' + Availability: nonswift + AvailabilityMsg: Use 'decodeInt32(forKey:)' instead + MethodKind: Instance +- Name: NSKeyedUnarchiver + SwiftName: NSKeyedUnarchiver + Methods: + - Selector: 'encodeInt:forKey:' + Availability: nonswift + AvailabilityMsg: Use 'encodeInt32(_:forKey:)' instead + MethodKind: Instance + - Selector: 'decodeIntForKey:' + Availability: nonswift + AvailabilityMsg: Use 'decodeInt32(forKey:)' instead + MethodKind: Instance - Name: NSCoder SwiftName: NSCoder Methods: @@ -168,10 +190,10 @@ Classes: Availability: nonswift AvailabilityMsg: use generic 'decodeObjectOfClass(_:forKey:)' - Selector: 'encodeInt:forKey:' - Availability: nonswift + SwiftName: encodeCInt(_:forKey:) MethodKind: Instance - Selector: 'decodeIntForKey:' - Availability: nonswift + SwiftName: decodeCInt(forKey:) MethodKind: Instance - Selector: 'encodeDataObject:' SwiftName: encode(_:) @@ -554,10 +576,6 @@ Classes: SwiftName: NSArchiver - Name: NSUnarchiver SwiftName: NSUnarchiver -- Name: NSKeyedArchiver - SwiftName: NSKeyedArchiver -- Name: NSKeyedUnarchiver - SwiftName: NSKeyedUnarchiver - Name: NSUniqueIDSpecifier SwiftName: NSUniqueIDSpecifier - Name: NSUserActivity