Documentation Index

Fetch the complete documentation index at: https://docs.mapp.com/llms.txt

Use this file to discover all available pages before exploring further.

Reset the SDK Singleton

Prev Next

reset() restores the Mapp Intelligence singleton to its default state. Use this only for debugging and testing during integration — not in production.

Important: This method clears the current Track ID, Track Domain, everID, and resets internal session counters. After calling reset(), you must call initWithConfiguration(...) again before any further tracking.


What reset() does

  • Deletes the current everID (used to identify the user).

  • Clears the Track ID and Track Domain.

  • Resets the "one" parameter to 0 (creates a new user).

  • Resets the fns parameter to 1 (opens a new session).


Method

Method

Description

reset()

Resets the singleton to defaults. Re-initialize the SDK afterwards.


Example

@IBAction func resetTracking(_ sender: Any) {
    MappIntelligence.shared()?.reset()
    // Re-initialize the SDK before tracking again:
    MappIntelligence.shared()?.initWithConfiguration(
        [123451234512345],
        onTrackdomain: "https://your-trackdomain.com"
    )
}
- (IBAction)resetTracking:(id)sender {
    [[MappIntelligence shared] reset];
    // Re-initialize the SDK before tracking again:
    [[MappIntelligence shared]
        initWithConfiguration:@[@123451234512345]
                onTrackdomain:@"https://your-trackdomain.com"];
}

When to use it

  • To clear the SDK state during integration testing.

  • Before changing fundamental setup (Track ID, Track Domain) and you want to be sure no stale state remains.


When not to use it