Appboy / appboy-ios-sdk

Public repo for the Braze iOS SDK
https://www.braze.com
Other
165 stars 142 forks source link

when APPboy Integrate have a error: [APPBOY] Got request to switch to the current user ID. There is nothing to transition, returning without action #258

Closed wannibadehaizi closed 3 years ago

wannibadehaizi commented 3 years ago

Describe your environment.

Info Value
Platform Name e.g. ios / tvos
Platform Version e.g. 14.0
SDK Version e.g. 3.28.0
Integration Method e.g. / cocoapods
Xcode Version e.g. Xcode 12.1
Repro rate e.g. all the time (100%) / sometimes x% / only once

What did you do?

What did you expect to happen?

Bucimis commented 3 years ago

@wannibadehaizi hey, thanks for getting in touch. This is not an error message, but an expected result from calling changeUser multiple times with the same User Id.

The first time changeUser is called with a particular User Id, the SDK will change the current user to the new User Id. However, from that point forward, since the current user is already that User Id, the SDK takes no action if changeUser is called again with the same User Id. It will log to the console to report that that happened, but that's part of normal functioning of the SDK and not an error.

Note that the current user persists until the user uninstalls the app, persistent data is wiped, or changeUser is called again with a different User Id.