Skip to content

Commit

Permalink
Update Migration Guide with ID getters and observer
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-li authored and jinliu9508 committed Jan 31, 2024
1 parent 847a721 commit c5669d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String>)` | `void addAliases(Map<String, String> aliases)` | S*et aliases for the current user. If any alias already exists it will be overwritten.* |
| `fun addAliases(aliases: Map<String, String>)` | `void addAliases(Map<String, String> 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<String>)` | `void removeAliases(Collection<String> 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.* |
Expand Down

0 comments on commit c5669d3

Please sign in to comment.