ProfileAttribute 类

该类的方法创建预定义和自定义的个人档案属性。

AppMetrica 让您创建最多 100 个自定义属性。

Instance methods

birthDate()

创建生日属性。

customBool(_:)

创建一个自定义属性,类型为 bool。

customCounter(_:)

创建自定义属性,类型为标签。

自定义数字(_:)

创建一个自定义属性,使用double类型.

customString(_:)

创建一个自定义属性,类型为 string。

gender()

创建性别属性。

name()

创建一个名称属性。

notificationsEnabled()

创建通知状态属性。

Method descriptions

birthDate()

class func birthDate() -> BirthDateAttribute

创建生日属性。

注意

AppMetrica不会在网页界面显示预定义属性,如果ProfieId发送未配置。

返回:

实现 BirthDateAttribute 协议的实例。

customBool(_:)

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

创建一个自定义属性,类型为 bool。

参数:

名称

Attribute name. 该值最多可包含 200 个字符。

返回:

实现 CustomBoolAttribute 协议的实例。

customCounter(_:)

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

创建自定义的计数器类型属性。

参数:

名称

Attribute name. 该值最多可包含 200 个字符。

返回:

实现 CustomCounterAttribute 协议的实例。

customNumber(_:)

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

创建一个带有 double 类型的自定义属性。

参数:

名称

Attribute name. 该值最多可以包含 200 个字符。

返回:

实现 CustomNumberAttribute 协议的实例。

customString(_:)

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

创建一个自定义属性,类型为 string。

参数:

名称

Attribute name. 该值最多可包含 200 个字符。

返回:

实现 CustomStringAttribute 协议的实例。

gender()

class func gender() -> GenderAttribute

创建性别属性。

注意

AppMetrica不会在网页界面显示预定义属性,如果ProfieId发送未配置。

返回:

实现 GenderAttribute 协议的实例。

name()

class func name() -> NameAttribute

创建名称属性。

注意

AppMetrica不会在网页界面显示预定义属性,如果ProfieId发送未配置。

返回:

实现 NameAttribute 协议的实例。

notificationsEnabled()

class func notificationsEnabled() -> NotificationsEnabledAttribute

创建 NotificationsEnabled 属性。

注意

AppMetrica不会在网页界面显示预定义属性,如果ProfieId发送未配置。

返回:

实现 NotificationsEnabledAttribute 协议的实例。