Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Making AFOAuth1Token conform to NSCopying

  • Loading branch information...
commit 1880c44787abd8be804e985c1fa55e604ebdf064 1 parent 5030fba
@mattt mattt authored
View
2  AFOAuth1Client/AFOAuth1Client.h
@@ -123,7 +123,7 @@ extern NSString * const kAFApplicationLaunchOptionsURLKey;
/**
*/
-@interface AFOAuth1Token : NSObject <NSCoding>
+@interface AFOAuth1Token : NSObject <NSCoding, NSCopying>
/**
View
13 AFOAuth1Client/AFOAuth1Client.m
@@ -487,4 +487,17 @@ - (void)encodeWithCoder:(NSCoder *)coder {
[coder encodeBool:self.renewable forKey:@"renewable"];
}
+#pragma mark - NSCopying
+
+- (id)copyWithZone:(NSZone *)zone {
+ AFOAuth1Token *copy = [[[self class] allocWithZone:zone] init];
+ copy.key = self.key;
+ copy.secret = self.secret;
+ copy.session = self.session;
+ copy.expiration = self.expiration;
+ copy.renewable = self.renewable;
+
+ return copy;
+}
+
@end
Please sign in to comment.
Something went wrong with that request. Please try again.