Inherits from NSObject
Declared in NetmeraUser.h
NetmeraUser.m

Overview

NetmeraUser object is for managing users of the application. You can register, update, login users with this class.

Tasks

Class Methods

getCurrentUser

Returns the current logged user. If no user logged in then it returns nil.

+ (NetmeraUser *)getCurrentUser

Return Value

current user

Discussion

Returns the current logged user. If no user logged in then it returns nil.

Declared In

NetmeraUser.h

loginInBackgroundWithTarget:selector:withEmail:andPassword:

Logs a user into the registered application. Email and password fields of user is used for this operation.

+ (void)loginInBackgroundWithTarget:(id)target selector:(SEL)selector withEmail:(NSString *)email andPassword:(NSString *)password

Parameters

target

The object to call selector on.

selector

The selector to call. It should have the following signature: (void) callBackLoginWithError:(NSError )error withNetmeraUser:(NetmeraUser )user. error will be nil on success and set if there was an error.

email

of the user

password

of the user

Discussion

Logs a user into the registered application. Email and password fields of user is used for this operation.

Declared In

NetmeraUser.h

loginWithEmail:andPassword:withError:

Logs a user into the registered application. Email and password fields of user is used for this operation.

+ (NetmeraUser *)loginWithEmail:(NSString *)email andPassword:(NSString *)password withError:(NSError **)error

Parameters

email

of the user

password

of the user

error

if it cannot access server

Return Value

the logged User

Discussion

Logs a user into the registered application. Email and password fields of user is used for this operation.

Declared In

NetmeraUser.h

logout

User logged out from the application.

+ (void)logout

Discussion

User logged out from the application.

Declared In

NetmeraUser.h

Instance Methods

activateUserWithEmail:andError:

Activates the registered User.

- (BOOL)activateUserWithEmail:(NSString *)email andError:(NSError **)error

Parameters

email

of the user

error

if it cannot access server

Discussion

Activates the registered User.

Declared In

NetmeraUser.h

deactivateUserWithEmail:andError:

Deactivates the registered User

- (BOOL)deactivateUserWithEmail:(NSString *)email andError:(NSError **)error

Parameters

email

of the user

error

if it cannot access server

Discussion

Deactivates the registered User

Declared In

NetmeraUser.h

registerInBackgroundWithBlock:

Registers new user in the background thread and executes the given callback block. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.

- (void)registerInBackgroundWithBlock:(void ( ^ ) ( NSError *error ))block

Parameters

block

The block to execute. The block should have the following argument signature: (NSError *error)

Discussion

Registers new user in the background thread and executes the given callback block. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.

Declared In

NetmeraUser.h

registerInBackgroundWithTarget:selector:

Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.

- (void)registerInBackgroundWithTarget:(id)target selector:(SEL)selector

Parameters

target

The object to call selector on.

selector

The selector to call. It should have the following signature: (void) callBackRegisterWithError:(NSError *)error. error will be nil on success and set if there was an error.

Discussion

Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.

Declared In

NetmeraUser.h

registerWithError:

Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.

- (BOOL)registerWithError:(NSError **)error

Parameters

error

if it cannot access server

Discussion

Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.



NetmeraUser user = [[NetmeraUser alloc] init];
user.email = @“test@test.com”;
user.password = @“12345”;
user.nickname = @“test”;
NSError
err = nil;
BOOL isregistered = [user registerWithError:&err];

Declared In

NetmeraUser.h

update:

Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.

- (BOOL)update:(NSError **)error

Parameters

error

if it cannot access server

Discussion

Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.

Declared In

NetmeraUser.h

updateInBackgroundWithBlock:

Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.

- (void)updateInBackgroundWithBlock:(void ( ^ ) ( NSError *error ))block

Parameters

block

The block to execute. The block should have the following argument signature: (NSError *error)

Discussion

Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.

Declared In

NetmeraUser.h

updateInBackgroundWithTarget:selector:

Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.

- (void)updateInBackgroundWithTarget:(id)target selector:(SEL)selector

Parameters

target

The object to call selector on.

selector

The selector to call. It should have the following signature: (void) callBackUpdateWithError:(NSError *)error. error will be nil on success and set if there was an error.

Discussion

Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.

Declared In

NetmeraUser.h