Inherits from NSObject
Declared in VKStorage.h

Overview

Class manages user access tokens and corresponding cached data.

Tasks

Properties

Initialization

VKStorageItem creation

Managing VKStorage items

Obtaining VKStorageItems

Properties

count

Size of VKStorage storage (number of objects in it)

@property (nonatomic, readonly) NSUInteger count

Declared In

VKStorage.h

fullCacheStoragePath

Full path to main cache directory

@property (nonatomic, readonly) NSString *fullCacheStoragePath

Declared In

VKStorage.h

fullStoragePath

Full path to main storage directory

@property (nonatomic, readonly) NSString *fullStoragePath

Declared In

VKStorage.h

isEmpty

Is current storage empty?

@property (nonatomic, readonly) BOOL isEmpty

Declared In

VKStorage.h

Class Methods

sharedStorage

Shared storage

+ (instancetype)sharedStorage

Return Value

shared instance of VKStorage class

Declared In

VKStorage.h

Instance Methods

clean

Clears storage.

- (void)clean

Declared In

VKStorage.h

cleanCachedData

Removes all cached data for all users.

- (void)cleanCachedData

Declared In

VKStorage.h

createStorageItemForAccessToken:

Creates new VKStorageItem

- (VKStorageItem *)createStorageItemForAccessToken:(VKAccessToken *)token

Parameters

token

VKAccessToken for which new storage item will be created

Return Value

instance of VKStorageItem

Declared In

VKStorage.h

removeItem:

Removes VKStorageItem from VKStorage.

- (void)removeItem:(VKStorageItem *)item

Parameters

item

item to remove from VKStorage

Declared In

VKStorage.h

storageItemForUserID:

Returns user’s corresponding VKStorageItem by unique user identifier

- (VKStorageItem *)storageItemForUserID:(NSUInteger)userID

Parameters

userID

unique user identifier

Return Value

instance of VKStorageItem, or nil, if there is no such.

Declared In

VKStorage.h

storageItems

List of all items in current storage

- (NSArray *)storageItems

Return Value

array of VKStorageItems

Declared In

VKStorage.h

storeItem:

Adds new element to VKStorage

- (void)storeItem:(VKStorageItem *)item

Parameters

item

new item to be added

Declared In

VKStorage.h