#import <ABKUser.h>
Properties | |
NSString * | firstName |
NSString * | lastName |
NSString * | |
NSDate * | dateOfBirth |
NSString * | country |
NSString * | homeCity |
NSString * | language |
NSString * | phone |
NSString * | userID |
NSString * | avatarImageURL |
ABKFacebookUser * | facebookUser |
ABKTwitterUser * | twitterUser |
ABKAttributionData * | attributionData |
When setting the custom attributes with custom keys:
- (BOOL) addAlias: | (NSString *) | alias | |
withLabel: | (NSString *) | label | |
Adds an an alias for the current user. Individual (alias, label) pairs can exist on one and only one user. If a different user already has this alias or external user id, the alias attempt will be rejected on the server.
alias | The alias of the current user. |
label | The label of the alias; used to differentiate it from other aliases for the user. |
- (BOOL) addLocationCustomAttributeWithKey: | (NSString *) | key | |
latitude: | (double) | latitude | |
longitude: | (double) | longitude | |
Adds the location custom attribute for the user.
key | The custom attribute key |
latitude | The latitude of the location in degrees, the number should be in the range of [-90, 90] |
longitude | The longitude of the location in degrees, the number should be in the range of [-180, 180] |
- (BOOL) addToCustomAttributeArrayWithKey: | (NSString *) | key | |
value: | (NSString *) | value | |
Adds the string value to a custom attribute string array specified by the key. If you add a key that has not previously been set, a custom attribute string array will be created containing the value.
key | The custom attribute key |
value | A string to be added to the custom attribute string array |
- (BOOL) addToSubscriptionGroupWithGroupId: | (NSString *) | groupId |
Adds the user to a Subscription Group.
groupId | The string UUID corresponding to the subscription group, provided by the Braze dashboard. |
- (BOOL) incrementCustomUserAttribute: | (NSString *) | key |
Increments the value of an custom attribute by one. Only integer and long custom attributes can be incremented. Attempting to increment a custom attribute that is not an integer or a long will be ignored. If you increment a custom attribute that has not previously been set, a custom attribute will be created and assigned a value of one.
key | The identifier of the custom attribute |
- (BOOL) incrementCustomUserAttribute: | (NSString *) | key | |
by: | (NSInteger) | incrementValue | |
Increments the value of an custom attribute by a given amount. Only integer and long custom attributes can be incremented. Attempting to increment a custom attribute that is not an integer or a long will be ignored. If you increment a custom attribute that has not previously been set, a custom attribute will be created and assigned the value of incrementValue. To decrement the value of a custom attribute, use a negative incrementValue.
key | The identifier of the custom attribute |
incrementValue | The amount by which to increment the custom attribute |
- (BOOL) removeFromCustomAttributeArrayWithKey: | (NSString *) | key | |
value: | (NSString *) | value | |
Removes the string value from a custom attribute string array specified by the key. If you remove a key that has not previously been set, nothing will be changed.
key | The custom attribute key |
value | A string to be removed from the custom attribute string array |
- (BOOL) removeFromSubscriptionGroupWithGroupId: | (NSString *) | groupId |
Removes the user from a Subscription Group.
groupId | The string UUID corresponding to the subscription group, provided by the Braze dashboard. |
- (BOOL) removeLocationCustomAttributeWithKey: | (NSString *) | key |
Removes the location custom attribute for the user.
key | The custom attribute key |
- (BOOL) setCustomAttributeArrayWithKey: | (NSString *) | key | |
array: | (nullable NSArray *) | valueArray | |
Sets a string array from a custom attribute specified by the key.
key | The custom attribute key |
valueArray | A string array to set as a custom attribute. If this value is nil, then Braze will unset the custom attribute and remove the corresponding array if there is one. |
- (BOOL) setCustomAttributeWithKey: | (NSString *) | key | |
andBOOLValue: | (BOOL) | value | |
key | The String name of the custom user attribute |
value | A boolean value to set as a custom attribute |
- (BOOL) setCustomAttributeWithKey: | (NSString *) | key | |
andDateValue: | (NSDate *) | value | |
key | The String name of the custom user attribute |
value | An NSDate value to set as a custom attribute |
- (BOOL) setCustomAttributeWithKey: | (NSString *) | key | |
andDoubleValue: | (double) | value | |
key | The String name of the custom user attribute |
value | A double value to set as a custom attribute |
- (BOOL) setCustomAttributeWithKey: | (NSString *) | key | |
andIntegerValue: | (NSInteger) | value | |
key | The String name of the custom user attribute |
value | An integer value to set as a custom attribute |
- (BOOL) setCustomAttributeWithKey: | (NSString *) | key | |
andStringValue: | (NSString *) | value | |
key | The String name of the custom user attribute |
value | An NSString value to set as a custom attribute |
- (BOOL) setEmailNotificationSubscriptionType: | (ABKNotificationSubscriptionType) | emailNotificationSubscriptionType |
Sets whether or not the user should be sent email campaigns. Setting it to unsubscribed opts the user out of an email campaign that you create through the Braze dashboard.
emailNotificationSubscriptionType | enum representing the user's email notifications subscription type. |
- (BOOL) setGender: | (ABKUserGenderType) | gender |
gender | ABKUserGender enum representing the user's gender. |
- (BOOL) setLastKnownLocationWithLatitude: | (double) | latitude | |
longitude: | (double) | longitude | |
horizontalAccuracy: | (double) | horizontalAccuracy | |
Sets the last known location for the user. Intended for use with ABKDisableLocationAutomaticTrackingOptionKey set to YES when starting Braze, so that the only locations being set are by the integrating app. Otherwise, calls to this method will be contending with automatic location update events.
latitude | The latitude of the User's location in degrees, the number should be in the range of [-90, 90] |
longitude | The longitude of the User's location in degrees, the number should be in the range of [-180, 180] |
horizontalAccuracy | The accuracy of the User's horizontal location in meters, the number should not be negative |
- (BOOL) setLastKnownLocationWithLatitude: | (double) | latitude | |
longitude: | (double) | longitude | |
horizontalAccuracy: | (double) | horizontalAccuracy | |
altitude: | (double) | altitude | |
verticalAccuracy: | (double) | verticalAccuracy | |
Sets the last known location for the user. Intended for use with ABKDisableLocationAutomaticTrackingOptionKey set to YES when starting Braze, so that the only locations being set are by the integrating app. Otherwise, calls to this method will be contending with automatic location update events.
latitude | The latitude of the User's location in degrees, the number should be in the range of [-90, 90] |
longitude | The longitude of the User's location in degrees, the number should be in the range of [-180, 180] |
horizontalAccuracy | The accuracy of the User's horizontal location in meters, the number should not be negative |
altitude | The altitude of the User's location in meters |
verticalAccuracy | The accuracy of the User's vertical location in meters, the number should not be negative |
- (BOOL) setPushNotificationSubscriptionType: | (ABKNotificationSubscriptionType) | pushNotificationSubscriptionType |
Sets the push notification subscription status of the user. Used to collect information about the user.
pushNotificationSubscriptionType | enum representing the user's push notifications subscription type. |
- (BOOL) unsetCustomAttributeWithKey: | (NSString *) | key |
key | The String name of the custom user attribute to unset |
|
readwriteatomicstrong |
Sets the attribution information for the user. For in apps that have an install tracking integration. For more information, please refer to ABKAttributionData.h.
|
readwritenonatomiccopy |
The User's avatar image URL. This URL will be processed by the server and used in their user profile on the dashboard. (String)
|
readwritenonatomiccopy |
The User's country (String)
|
readwritenonatomiccopy |
The User's date of birth (NSDate)
|
readwritenonatomiccopy |
The User's email (String)
|
readwriteatomicstrong |
The User's Facebook account information. For more detail, please refer to ABKFacebookUser.h.
|
readwritenonatomiccopy |
The User's first name (String)
|
readwritenonatomiccopy |
The User's home city (String)
|
readwritenonatomiccopy |
The User's language (String)
Language Strings should be valid ISO 639-1 language codes. See https://www.loc.gov/standards/iso639-2/php/code_list.php.
If not set here, user language will be inferred from the device language.
|
readwritenonatomiccopy |
The User's last name (String)
|
readwritenonatomiccopy |
The User's phone number (String)
|
readwriteatomicstrong |
The User's Twitter account information. For more detail, please refer to ABKTwitterUser.h.