braze-inc / braze-swift-sdk

Braze SDK for the Apple ecosystem, including: iOS, macOS, iPadOS, visionOS, tvOS
https://www.braze.com
Other
52 stars 19 forks source link

[Feature]: `changeUser` doesn't accept `nil` #13

Closed clausjoergensen closed 2 years ago

clausjoergensen commented 2 years ago

Platform

iOS

Platform Version

15.5

Braze SDK Version

5.3.1

Xcode Version

Xcode 13.4.1

Computer Processor

Apple (M1)

Repro Rate

100% of the time

Steps To Reproduce

changeUser(userId:) doesn't accept nil preventing us from setting it back to anonymous when our users logs out.

Expected Behavior

changeUser(userId:) should accept nil allowing us to set it back to anonymous when our users logs out.

Actual Incorrect Behavior

Braze doesn't know the user is logged out

Verbose Logs

No response

Additional Information

No response

davidbielik commented 2 years ago

Hi @clausjoergensen thanks for raising this. Our SDK doesn't have a logout method and doesn't support passing nil when changing users. The closest workaround would be to call the wipe data method to clear out the locally stored user.

If you have a specific use case, I'd encourage you to leave feedback on our roadmap portal under the Submit New Ideas section to help us gauge the frequency and impact of these new features.