EMBRegistrationFlow

@interface EMBRegistrationFlow : EMBCustomFlow

This class is responsible for tracking app performance during registration flows.

This class is thread-safe.

  • Starts a registration moment.

    This method should be called as soon as a user wishes to submit their user registration info. This method is designed specifically for cases where the registration occurs through an internally managed service as opposed to an external service (e.g. Google, Facebook, GitHub Login).

    Declaration

    Objective-C

    - (BOOL)registrationStartWithId:(nullable NSString *)userId
                           username:(nullable NSString *)username
                              email:(nullable NSString *)email
                         properties:(nullable EMBProperties *)properties;

    Swift

    func registrationStart(withId userId: String?, username: String?, email: String?, properties: [String : String]?) -> Bool

    Parameters

    userId

    An identifier that uniquely represents the user (e.g. frequent flyer number). This value is optional and, if present, will associate the value as a property of the moment.

    username

    The username of the user. This value is optional and, if present, will associate the value as a property of the moment.

    email

    The email address of the user. This value is optional and, if present, will associate the value as a property of the moment.

    properties

    A map of Strings to Objects that represent additional properties to associate with the moment. This value is optional. A maximum of 10 properties (not including the ones set via arguments to this method) may be set.

    Return Value

    True if the operation was successful; false otherwise.

  • Starts a registration moment.

    This method should be called as soon as a user wishes to submit their user registration info. This method is designed specifically for cases where the registration occurs through an external authentication service (e.g. Google, Facebook, GitHub Login).

    Declaration

    Objective-C

    - (BOOL)registrationStartWithSource:(nullable NSString *)source
                             properties:(nullable EMBProperties *)properties;

    Swift

    func registrationStart(withSource source: String?, properties: [String : String]?) -> Bool

    Parameters

    source

    The registration system that will be authenticating the user. This value is optional and, if present, will associate the value as a property of the moment.

    properties

    A map of Strings to Objects that represent additional properties to associate with the moment. This value is optional. A maximum of 10 properties (not including the ones set via arguments to this method) may be set.

    Return Value

    True if the operation was successful; false otherwise.

  • Ends the registration moment and generates an info log message that indicates that the registration completed.

    This method should be called once the registration information has been submitted. If any of the following values were defined when the registration moment was initially started, the SDK will register the device ID to all valid user information.

    • Email
    • Username
    • User Identifier

    Declaration

    Objective-C

    - (BOOL)registrationComplete;

    Swift

    func registrationComplete() -> Bool

    Return Value

    True if the operation was successful; false otherwise.

  • Ends the registration moment and generates an info log message that indicates that the registration completed.

    This method should be called once the registration information has been submitted. If any of the following values were defined when the registration moment was initially started, the SDK will register the device ID to all valid user information.

    • Email
    • Username
    • User Identifier

    Declaration

    Objective-C

    - (BOOL)registrationCompleteWithProperties:(nullable EMBProperties *)properties;

    Swift

    func registrationComplete(withProperties properties: [String : String]?) -> Bool

    Parameters

    properties

    A map of Strings to Objects that represent additional properties to associate with the moment. This value is optional. A maximum of 10 properties (not including the ones set via arguments to this method) may be set.

    Return Value

    True if the operation was successful; false otherwise.

  • Ends the registration moment and generates an info log message that indicates that the registration completed.

    This method should be called once the registration information has been submitted. If any of the following values were defined when the registration moment was initially started, the SDK will register the device ID to all valid user information.

    • Email
    • Username
    • User Identifier

    Declaration

    Objective-C

    - (BOOL)registrationCompleteAsPayer:(BOOL)isPayer;

    Swift

    func registrationComplete(asPayer isPayer: Bool) -> Bool

    Parameters

    isPayer

    An optional value that indicates whether the user is a payer or not. If this value is null, then it will not modify the payer persona status of the user.

    Return Value

    True if the operation was successful; false otherwise.

  • Ends the registration moment and generates an info log message that indicates that the registration completed.

    This method should be called once the registration information has been submitted. If any of the following values were defined when the registration moment was initially started, the SDK will register the device ID to all valid user information.

    • Email
    • Username
    • User Identifier

    Declaration

    Objective-C

    - (BOOL)registrationCompleteAsPayer:(BOOL)isPayer
                             properties:(nullable EMBProperties *)properties;

    Swift

    func registrationComplete(asPayer isPayer: Bool, properties: [String : String]?) -> Bool

    Parameters

    isPayer

    An optional value that indicates whether the user is a payer or not. If this value is null, then it will not modify the payer persona status of the user.

    properties

    A map of Strings to Objects that represent additional properties to associate with the moment. This value is optional. A maximum of 10 properties (not including the ones set via arguments to this method) may be set.

    Return Value

    True if the operation was successful; false otherwise.

  • Ends the registration moment and generates a log error message that indicates that the registration failed.

    This method should be called once the registration information has been submitted.

    Declaration

    Objective-C

    - (BOOL)registrationFailWithMessage:(nullable NSString *)message;

    Swift

    func registrationFail(withMessage message: String?) -> Bool

    Parameters

    message

    A message that explains the reason for why this operation failed. This value is optional and, if provided, will associate the value as a property of the error log message.

    Return Value

    True if the operation was successful; false otherwise.

  • Ends the registration moment and generates a log error message that indicates that the registration failed.

    This method should be called once the registration information has been submitted.

    Declaration

    Objective-C

    - (BOOL)registrationFailWithMessage:(nullable NSString *)message
                             properties:(nullable EMBProperties *)properties;

    Swift

    func registrationFail(withMessage message: String?, properties: [String : String]?) -> Bool

    Parameters

    message

    A message that explains the reason for why this operation failed. This value is optional and, if provided, will associate the value as a property of the error log message.

    properties

    A map of Strings to Objects that represent additional properties to associate with the moment. This value is optional. A maximum of 10 properties (not including the ones set via arguments to this method) may be set.

    Return Value

    True if the operation was successful; false otherwise.