Reset API in Mobile SDKs

Learn about the reset API call in Kotlin and Swift SDKs.

This guide explains how to use the reset API in Kotlin and Swift SDKs.

Overview

The RudderStack Kotlin and Swift SDKs provide a reset API that you can use to clear the user ID and traits.

The SDK also does the following once you call the reset API:

  • Generates a new anonymousId.
  • If session tracking is enabled, clears the current sessionId and generates a new one.
info
If a mobile device mode integration plugin is present, then the reset call also triggers the integration’s reset API, provided it is supported.

Usage

The following snippet highlights how to use the reset API in the Kotlin and Swift SDKs:


Questions? Contact us by email or on Slack