Inherits from NSObject
Declared in KiiUserFields.h

Properties

country

The country code associated with this user

@property (nonatomic, nullable) NSString *country

Discussion

The country code associated with this user

Declared In

KiiUserFields.h

displayName

Display name for this user. Cannot be used for logging a user in; is non-unique.

@property (nonatomic, nullable) NSString *displayName

Discussion

Display name for this user. Cannot be used for logging a user in; is non-unique.

Declared In

KiiUserFields.h

locale

LocaleContainer of this user

@property (nonatomic, nullable) LocaleContainer *locale

Discussion

LocaleContainer of this user

Declared In

KiiUserFields.h

Instance Methods

getObjectForKey:

Gets the value associated with the given key

- (nullable id)getObjectForKey:(NSString *)key

Parameters

key

The key to retrieve

Return Value

An object if the key exists, nil otherwise

Discussion

Gets the value associated with the given key

Exceptions

NSInvalidArgumentException

when key is nil/empty.

Declared In

KiiUserFields.h

hasObject:

Checks to see if an object exists for a given key

- (BOOL)hasObject:(NSString *)key

Parameters

key

The key to check for existence

Return Value

True if the object exists, false otherwise.

Discussion

Checks to see if an object exists for a given key

Exceptions

NSInvalidArgumentException

when key is nil/empty.

Declared In

KiiUserFields.h

removeFromServerForKey:

Remove a pair of key/value from UserFields.

- (void)removeFromServerForKey:(NSString *)key

Parameters

key

to remove.

Discussion

Remove a pair of key/value from UserFields.

This pair is also removed from server when or succeeded.

Note: has a similar method which is . If you remove fields by , pairs are not removed from server. So you can use if you want to cancel to update fields which are set in {@link UserFields}.

Exceptions

NSInvalidArgumentException

when key is nil/empty or equal to reserved key.

Declared In

KiiUserFields.h

removeObjectForKey:

Removes a specific key/value pair from the object

- (void)removeObjectForKey:(NSString *)key

Parameters

key

The key of the key/value pair that will be removed

Discussion

Removes a specific key/value pair from the object

If the key exists, the key/value will be removed from the object.

Exceptions

NSInvalidArgumentException

when key is nil/empty.

Declared In

KiiUserFields.h

setObject:forKey:

Sets a key/value pair to a KiiUser

- (BOOL)setObject:(id)object forKey:(NSString *)key

Parameters

object

The value to be set. Object must be of a JSON-encodable type (Ex: NSDictionary, NSArray, NSString, NSNumber, etc)

key

The key to set. The key must not be a reserved key (loginName, emailAddress, phoneNumber, displayName, country, userID) or begin with an underscore (_).

Return Value

True if the object was set, false otherwise.

Discussion

Sets a key/value pair to a KiiUser

If the key already exists, its value will be written over. If the object is of invalid type, it will return false. Accepted types are any JSON-encodable objects.

Exceptions

NSInvalidArgumentException

when key is nil/empty; equal to reserved key; and/or object is nil.

Declared In

KiiUserFields.h