ProfileAttribute 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 with the tag 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 notification status attribute.

Method descriptions

birthDate()

class func birthDate() -> BirthDateAttribute

Creates a birth date attribute.

Alert

AppMetrica doesn't display predefined attributes in the web interface if ProfieId sending isn't configured.

Returns:

The instance that implements the BirthDateAttribute protocol.

customBool(_:)

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

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 CustomBoolAttribute protocol.

customCounter(_:)

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

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 CustomCounterAttribute protocol.

customNumber(_:)

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

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 CustomNumberAttribute protocol.

customString(_:)

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

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 CustomStringAttribute protocol.

gender()

class func gender() -> GenderAttribute

Creates a gender attribute.

Alert

AppMetrica doesn't display predefined attributes in the web interface if ProfieId sending isn't configured.

Returns:

The instance that implements the GenderAttribute protocol.

name()

class func name() -> NameAttribute

Creates a name attribute.

Alert

AppMetrica doesn't display predefined attributes in the web interface if ProfieId sending isn't configured.

Returns:

The instance that implements the NameAttribute protocol.

notificationsEnabled()

class func notificationsEnabled() -> NotificationsEnabledAttribute

Creates a NotificationsEnabled attribute.

Alert

AppMetrica doesn't display predefined attributes in the web interface if ProfieId sending isn't configured.

Returns:

The instance that implements the NotificationsEnabledAttribute protocol.