teardown

Tears down the SDK and prepares it for re-initialization.

Call this method in development environments that support hot reload (e.g., Expo, React Native) before calling configure again. This method:

  • Resets all user data, assignments, and caches

  • Clears the paywall view cache and destroys WebViews

  • Resets the paywall request cache

  • Allows configure to be called again

After calling this method, you must call configure to use the SDK again.

Example usage in Expo/React Native hot reload:

// Before hot reload reconfiguration
Superwall.teardown()

// Then reconfigure
Superwall.configure(applicationContext, apiKey, ...)

Note: This is intended for development use only. Do not rely on this method in production as a way to reset.