IDENTITY

@objc(SFMCSdkIDENTITY)
public final class IDENTITY : NSObject
  • Declaration

    Swift

    @objc
    public func toJson() -> String
  • Set profile ID to all operational, subscribed modules.

    Declaration

    Swift

    @objc
    public func setProfileId(_ profile: String)

    Parameters

    profile

    profile to set

  • Set profile ID to specified module subset

    Declaration

    Swift

    public func setProfileId(_ profile: String, _ modules: [ModuleName])

    Parameters

    profile

    profile to set

    modules

    subset of modules to assign given profile to

  • Set different profile IDs to different modules

    Declaration

    Swift

    public func setProfileId(_ modules: [ModuleName : String])

    Parameters

    modules

    Module and Profile ID as a key-value pair, for example: .push: “MyNewProfileID”

  • Clear a profile attribute

    Declaration

    Swift

    @objc
    public func clearProfileAttribute(key: String)

    Parameters

    key

    to clear value for

  • Clear profile attributes

    Declaration

    Swift

    @objc
    public func clearProfileAttributes(keys: [String])

    Parameters

    keys

    to clear values for

  • Set Profile Attributes to all operational, subscribed modules.

    Declaration

    Swift

    @objc
    public func setProfileAttributes(_ attributes: [String : String])

    Parameters

    attributes

    attributes to set

  • Set a Profile Attribute to the modules identified by the enumerable “ModuleName” If modules are not specified, the method will default to all modules

    Declaration

    Swift

    public func setProfileAttribute(_ key: String, _ value: String, _ modules: [ModuleName] = ModuleName.allCases)

    Parameters

    key

    name of the attribute

    value

    value of the attribute

  • Set Profile Attributes to a subset of modules.

    Declaration

    Swift

    public func setProfileAttributes(_ attributes: [String : String], _ modules: [ModuleName])

    Parameters

    attributes

    attributes to set

    modules

    subset of modules to assign given attributes to

  • Set different sets of attributes to different modules

    Declaration

    Swift

    public func setProfileAttributes(_ attributes: [ModuleName : [String : String]])

    Parameters

    attributes

    Module name and set of key-value attributes pairs, for example: [.push: [“MyAttributeKey”: “MyAttributeValue”]]