Inherits from NSObject
Declared in VKUser.h

Overview

Manages users

Tasks

Other Methods

Class methods

Overridden methods

Properties

accessToken

User’s access token

@property (nonatomic, readonly) VKAccessToken *accessToken

Declared In

VKUser.h

Class Methods

activateUserWithID:

Activates user with passed unique user identifier

+ (BOOL)activateUserWithID:(NSUInteger)userID

Parameters

userID

unique user identifier, user which should be activated

Return Value

YES - if user was activated, NO - otherwise

Discussion

If there is no such user then NO will be returned, otherwise - YES.

Declared In

VKUser.h

currentUser

Current activated user

+ (instancetype)currentUser

Discussion

If there is no users in VKStorage then nil will be returned. If no user was activated, then random user will be activated.

Lets assume we have such situation:

// user A authorized
// user B authorized
// user C authorized
[VKUser currentUser] // random user will be activated - A or B or C

Second example:

// user A authorized
[VKUser currentUser] // user A becomes active user
// user B authorized, but A is still active
// user C authorized, but A is still active
// so on.

Declared In

VKUser.h

localUsers

List of users which were saved in VKStorage

+ (NSArray *)localUsers

Return Value

list of users (@(NSUInteger) objects - user unique identifiers)

Declared In

VKUser.h

Instance Methods

description

Description of current user

- (NSString *)description

Declared In

VKUser.h