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

[Bug]: External ID being removed from subscription when the app is suspended on iOS #1771

Open
2 of 3 tasks
AceNorth opened this issue Dec 13, 2024 · 0 comments
Open
2 of 3 tasks

Comments

@AceNorth
Copy link

AceNorth commented Dec 13, 2024

What happened?

We're seeing an issue on iOS where the external ID is removed from an existing subscription when the app is backgrounded.

Steps to reproduce?

I was seeing this happen on the subscription dashboard, so I added this event listener to debug:

const listener = (event: UserChangedState) => {
      console.log('User changed, externalId: ' + event.current.externalId);
      console.log('User changed, onesignalId: ' + event.current.onesignalId);
    };

When the app is suspended (when the user enters the App Switching view, before the app is even backgrounded) I see an event come in where onesignalId is present but externalId is null. Then the externalId is removed from the subscription record on the dashboard, without us calling any OneSignal methods in the code.

What did you expect to happen?

As I understand it, the external ID should remain associated with the subscription unless we call OneSignal.logout.

React Native OneSignal SDK version

5.2.5

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AceNorth AceNorth changed the title [Bug]: External ID being removed from subscription when the app is suspended [Bug]: External ID being removed from subscription when the app is suspended on iOS Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant