Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Support clearing user with null on iOS native bridge #207

Merged
merged 3 commits into from
Mar 18, 2021

Conversation

jennmueng
Copy link
Member

@jennmueng jennmueng commented Mar 17, 2021

Cordova passes the values as NSNull and not nil like on React Native.

Fixes #203

Testing:

Tested on Cordova sample app that after setting the user on the scope, calling setUser on the JS layer with null clears the user on iOS in a native crash.

@jennmueng jennmueng added the Platform: iOS Related to, or using the iOS platform label Mar 17, 2021
@jennmueng jennmueng requested a review from a team March 17, 2021 09:16
@jennmueng jennmueng self-assigned this Mar 17, 2021
@jennmueng jennmueng added this to Waiting for Review in Mobile Platform Team Archived Mar 17, 2021
@jennmueng jennmueng changed the title fix: Support setting user as null on iOS native bridge fix: Support clearing user with null on iOS native bridge Mar 18, 2021
@jennmueng jennmueng changed the base branch from jenn/event-origin-tag to main March 18, 2021 11:17
Copy link

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jennmueng jennmueng merged commit 5790b84 into main Mar 18, 2021
Mobile Platform Team Archived automation moved this from Waiting for Review to Done Mar 18, 2021
@lucas-zimerman lucas-zimerman deleted the jenn/ios-set-user-fix branch September 15, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS Related to, or using the iOS platform
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Calling setUser with null crashes iOS
2 participants