YMMProfileAttribute class

Methods of the class create predefined and custom profile attributes.

AppMetrica lets you create up to 100 custom attributes.

Instance methods

birthDate()

Creates a birth date attribute.

customBool(_:)

Creates a custom attribute with the bool type.

customCounter(_:)

Creates a custom attribute of the counter type.

customNumber(_:)

Creates a custom attribute with the double type.

customString(_:)

Creates a custom attribute with the string type.

gender()

Creates a gender attribute.

name()

Creates a name attribute.

notificationsEnabled()

Creates a NotificationsEnabled attribute.

Method descriptions

birthDate()

class func birthDate() -> YMMBirthDateAttribute

Creates a birth date attribute.

Returns:

The instance that implements the YMMBirthDateAttribute protocol.

customBool(_:)

class func customBool(_ name: String) -> YMMCustomBoolAttribute

Creates a custom attribute with the bool type.

Parameters:
name

Attribute name. The value can contain up to 200 characters.

Returns:

The instance that implements the YMMCustomBoolAttribute protocol.

customCounter(_:)

class func customCounter(_ name: String) -> YMMCustomCounterAttribute

Creates a custom attribute of the counter type.

Parameters:
name

Attribute name. The value can contain up to 200 characters.

Returns:

The instance that implements the YMMCustomCounterAttribute protocol.

customNumber(_:)

class func customNumber(_ name: String) -> YMMCustomNumberAttribute

Creates a custom attribute with the double type.

Parameters:
name

Attribute name. The value can contain up to 200 characters.

Returns:

The instance that implements the YMMCustomNumberAttribute protocol.

customString(_:)

class func customString(_ name: String) -> YMMCustomStringAttribute

Creates a custom attribute with the string type.

Parameters:
name

Attribute name. The value can contain up to 200 characters.

Returns:

The instance that implements the YMMCustomStringAttribute protocol.

gender()

class func gender() -> YMMGenderAttribute

Creates a gender attribute.

Returns:

The instance that implements the YMMGenderAttribute protocol.

name()

class func name() -> YMMNameAttribute

Creates a name attribute.

Returns:

The instance that implements the YMMNameAttribute protocol.

notificationsEnabled()

class func notificationsEnabled() -> YMMNotificationsEnabledAttribute

Creates a NotificationsEnabled attribute.

Returns:

The instance that implements the YMMNotificationsEnabledAttribute protocol.