Inherits from NSObject
Declared in KiiUserBuilder.h

Overview

KiiUser builder class.

Class Methods

builderWithEmail:password:

Create a KiiUser builder with an email address.

+ (instancetype)builderWithEmail:(NSString *)emailAddress password:(NSString *)password

Parameters

emailAddress

email address for the user.

password

for the user.

Return Value

KiiUser object builder.

Discussion

Create a KiiUser builder with an email address.

Declared In

KiiUserBuilder.h

builderWithGlobalPhoneNumber:password:

Create a KiiUser builder with an global phone number.

+ (instancetype)builderWithGlobalPhoneNumber:(NSString *)phoneNumber password:(NSString *)password

Parameters

phoneNumber

global phone number for the user.

password

for the user.

Return Value

KiiUser object builder.

Discussion

Create a KiiUser builder with an global phone number.

Declared In

KiiUserBuilder.h

builderWithIdentifier:password:

Create a KiiUser builder. This constructor is received identifier. The identifier is one of user name, email address or phone number. This constructor automatically identity What is identifier and build proper KiiUser object on build method.

+ (nullable instancetype)builderWithIdentifier:(NSString *)identifier password:(NSString *)password

Parameters

identifier

The user’s user name, email address or phone number.

password

for the user.

Return Value

KiiUser object builder. nil if identifier is none of email address, phone number and user name.

Discussion

Create a KiiUser builder. This constructor is received identifier. The identifier is one of user name, email address or phone number. This constructor automatically identity What is identifier and build proper KiiUser object on build method.

Some strings can be accepted as both user name and phone number. If such string is passed to this constructor as identifier, then phone number is prior to user name. String of email address is in different class against user name and phone number. So Email address is always identified correctly.

Declared In

KiiUserBuilder.h

builderWithLocalPhoneNumber:country:password:

Create a KiiUser builder with an local phone number and country code.

+ (instancetype)builderWithLocalPhoneNumber:(NSString *)phoneNumber country:(NSString *)country password:(NSString *)password

Parameters

phoneNumber

local phone number for the user.

country

country code for the local phone number.

password

for the user.

Return Value

KiiUser object builder.

Discussion

Create a KiiUser builder with an local phone number and country code.

Declared In

KiiUserBuilder.h

builderWithUsername:password:

Create a KiiUser builder with an user name.

+ (instancetype)builderWithUsername:(NSString *)username password:(NSString *)password

Parameters

username

user name.

password

for the user.

Return Value

KiiUser object builder.

Discussion

Create a KiiUser builder with an user name.

Declared In

KiiUserBuilder.h

Instance Methods

build

Build KiiUser object.

- (KiiUser *)build

Return Value

a working KiiUser object.

Discussion

Build KiiUser object.

Build KiiUser object. This method verify set values.

Declared In

KiiUserBuilder.h

setEmail:

Set email address.

- (instancetype)setEmail:(nullable NSString *)emailAddress

Parameters

emailAddress

email address.

Return Value

this builder object.

Discussion

Set email address.

Declared In

KiiUserBuilder.h

setGlobalPhoneNumber:

Set global phone number.

- (instancetype)setGlobalPhoneNumber:(nullable NSString *)phoneNumber

Parameters

phoneNumber

phone number.

Return Value

this builder object.

Discussion

Set global phone number.

If local phone number and its country code is alreday set to this builder instance, this method makes country code null.

Declared In

KiiUserBuilder.h

setLocalPhoneNumber:country:

Set local phone number and its country code.

- (instancetype)setLocalPhoneNumber:(nullable NSString *)phoneNumber country:(nullable NSString *)country

Parameters

phoneNumber

local phone number

country

country code.

Return Value

this builder object.

Discussion

Set local phone number and its country code.

If global phone number is alreday set to this builder instance, this method remove the global phone number.

Declared In

KiiUserBuilder.h

setUsername:

Set user name.

- (instancetype)setUsername:(nullable NSString *)username

Parameters

username

user name.

Return Value

this builder object.

Discussion

Set user name.

Declared In

KiiUserBuilder.h