File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -941,7 +941,27 @@ export class Iterable {
941941 /**
942942 * Logs out the current user from the Iterable SDK.
943943 *
944- * This method will remove all event listeners for the Iterable SDK and set the email and user ID to null.
944+ * This is the React Native equivalent of native `logoutUser`. There is no
945+ * dedicated bridged `logoutUser` method. `logout()` removes JS event
946+ * listeners and clears identity via `setEmail(null)` and `setUserId(null)`,
947+ * which triggers the native logout cleanup on both platforms.
948+ *
949+ * Native cleanup includes:
950+ * - resetting the auth manager
951+ * - resetting the in-app (and embedded) manager
952+ * - disabling the current push token when
953+ * `IterableConfig.autoPushRegistration` is `true`
954+ *
955+ * Both identity-clears are required. On iOS, `setEmail(null)` is a no-op
956+ * when the user is identified only by userId, and `setUserId(null)` is a
957+ * no-op when the user is identified only by email. Android has no public
958+ * `logoutUser`; private `logoutPreviousUser()` runs as part of identity
959+ * clear.
960+ *
961+ * iOS `logoutUser(withOnSuccess:onFailure:)` is not exposed.
962+ *
963+ * Calling `logout()` when no user is signed in is safe: listeners are
964+ * removed and native identity-clear is effectively a no-op.
945965 *
946966 * @example
947967 * ```typescript
You can’t perform that action at this time.
0 commit comments