From 62e12c4497c8b073ffb3d019ce20fc8565195bbe Mon Sep 17 00:00:00 2001 From: Nan Date: Thu, 28 Dec 2023 11:43:46 -0800 Subject: [PATCH] Update Migration Guide with ID getters and observer --- MIGRATION_GUIDE.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 6414f29a10..94a2ec5c31 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -259,8 +259,12 @@ The user name space is accessible via `OneSignal.User` (in Kotlin) or `OneSignal | `val pushSubscription: IPushSubscription` | `IPushSubscription getPushSubscription()` | *The push subscription associated to the current user.* | | `fun setLanguage(value: String)` | `void setLanguage(String value)` | *Set the 2-character language either as a detected language or explicitly set for this user.* | | `fun pushSubscription.addChangeHandler(handler: ISubscriptionChangedHandler)` | `void pushSubscription.addChangeHandler(ISubscriptionChangedHandler handler)` | *Adds a change handler that will run whenever the push subscription has been changed.* | +| `val onesignalId: String` | `String getOnesignalId()` | *Returns the OneSignal ID for the current user, which can be the empty string if it is not yet available.* | +| `val externalId: String` | `String getExternalId()` | *Returns the external ID for the current user, which can be the empty string if not set.* | +| `fun addObserver(observer: IUserStateObserver)` | `void addObserve(IUserStateObserver observer)` | *The `IUserStateObserver.onUserStateChange` method will be fired on the passed-in object when the user state changes. The User State contains the onesignalId and externalId (which can be empty strings), and the observer will be fired when these values change.* | +| `fun removeObserver(observer: IUserStateObserver)` | `void removeObserver(IUserStateObserver observer)` | *Remove a user state observer that has been previously added.* | | `fun addAlias(label: String, id: String)` | `void addAlias(String label, String id)` | *Set an alias for the current user. If this alias already exists it will be overwritten.* | -| `fun addAliases(aliases: Map)` | `void addAliases(Map aliases)` | S*et aliases for the current user. If any alias already exists it will be overwritten.* | +| `fun addAliases(aliases: Map)` | `void addAliases(Map aliases)` | *Set aliases for the current user. If any alias already exists it will be overwritten.* | | `fun removeAlias(label: String)` | `void removeAlias(String label)` | *Remove an alias from the current user.* | | `fun removeAliases(labels: Collection)` | `void removeAliases(Collection labels)` | *Remove multiple aliases from the current user.* | | `fun addEmail(email: String)` | `void addEmail(String email)` | *Add a new email subscription to the current user.* |