KiiUserFields Class Reference
| Inherits from | NSObject | 
| Declared in | KiiUserFields.h | 
Tasks
- 
	
		
displayNameproperty - 
	
		
countryproperty - 
	
		
localeproperty - 
	
		
– setObject:forKey: - 
	
		
– hasObject: - 
	
		
– removeObjectForKey: - 
	
		
– getObjectForKey: - 
	
		
– removeFromServerForKey: 
Properties
country
The country code associated with this user
@property (nonatomic, nullable) NSString *countryDiscussion
The country code associated with this user
Declared In
KiiUserFields.hInstance Methods
getObjectForKey:
Gets the value associated with the given key
- (nullable id)getObjectForKey:(NSString *)keyParameters
- 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.hhasObject:
Checks to see if an object exists for a given key
- (BOOL)hasObject:(NSString *)keyParameters
- 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.hremoveFromServerForKey:
Remove a pair of key/value from UserFields.
- (void)removeFromServerForKey:(NSString *)keyParameters
- key
 to remove.
Discussion
Remove a pair of key/value from UserFields.
This pair is also removed from server when 
Note: 
Exceptions
- NSInvalidArgumentException
 when key is nil/empty or equal to reserved key.
Declared In
KiiUserFields.hremoveObjectForKey:
Removes a specific key/value pair from the object
- (void)removeObjectForKey:(NSString *)keyParameters
- 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.hsetObject:forKey:
Sets a key/value pair to a KiiUser
- (BOOL)setObject:(id)object forKey:(NSString *)keyParameters
- 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