Kii Cloud SDK provides the predefined fields for storing the following user attributes:
JSON Field Name
User ID used in REST API (Example: 1234567-89ab-cdef-0123-456789abcdef`)
Internal User ID
User ID (for internal usage).
Username for login. The field only exists when a user signs up with his username.
Email address for login. The field only exists when a user signs up with his email address.
Email Verified Flag
"false" if the email verification is enabled, but the email address is not yet verified. "true" otherwise.
Phone number for login. The value is always stored in the international phone number format. The field only exists when a user signs up with his phone number.
Phone Verified Flag
"false" if the phone verification is enabled, but the phone number is not yet verified. "true" otherwise.
Display name. The system does not use this value, so your application can put any value. The field only exists when a user specifies the display name. The display name can have 1 to 50 Unicode characters.
2-letter country code like US, JP or CN. The field only exists when a user specifies the country. When you are using the domestic phone number format, this value will be used to interpret the number (e.g., if you set JP here with the phone number 09011111111, the SDK will interpret the phone number as +819011111111). The value will not be auto-filled from the international phone number format.
User's locale. The value is used for deciding the template to be applied for the email address and phone number verification.
Users can browse other user's fields, but you need to enable the "Expose Full User Data to Others" option to allow them to browse all fields. If the option is disabled, you can only fetch UserID, username and display name. See Retrieving Other User's Data for more information.
Setting and updating predefined fields
We use the KiiIdentityData and KiiUserFields classes for setting the predefined fields. Each class holds the following information:
The user ID is assigned automatically when the user is created. You cannot modify the user ID.
The following example illustrates how to set the predefined fields.
If an existing field is not explicitly specified for the update operation, the field remains unchanged on Kii Cloud.
The fields are updated on Kii Cloud and in the KiiUser instance after the updateWithUserFields:block: method is successfully completed.