diff --git a/Pod/Classes/PNClasses/PNUser.m b/Pod/Classes/PNClasses/PNUser.m index 1245468..53b89e6 100644 --- a/Pod/Classes/PNClasses/PNUser.m +++ b/Pod/Classes/PNClasses/PNUser.m @@ -31,7 +31,7 @@ static bool isFirstAccess = YES; dispatch_once(&onceToken, ^{ isFirstAccess = NO; - SINGLETON = [[super allocWithZone:NULL] init]; + SINGLETON = [[super allocWithZone:NULL] initForCurrentUser]; }); return SINGLETON; @@ -39,21 +39,6 @@ static bool isFirstAccess = YES; #pragma mark - Life Cycle -+ (instancetype) allocWithZone:(NSZone *)zone -{ - return [self currentUser]; -} - -+ (instancetype)copyWithZone:(struct _NSZone *)zone -{ - return [self currentUser]; -} - -+ (instancetype)mutableCopyWithZone:(struct _NSZone *)zone -{ - return [self currentUser]; -} - - (instancetype)copy { return [[PNUser alloc] init]; @@ -64,7 +49,7 @@ static bool isFirstAccess = YES; return [[PNUser alloc] init]; } -- (id) init +- (instancetype) initForCurrentUser { if(SINGLETON){ return SINGLETON;