BDK Native onesignal iOS: Player ID is always null

Has anyone had this issue? I’ve followed the docs here and when I test my app either on BDK preview or in iOS TestFlight, the OneSignal Player ID is always null. I’ve gone thru the docs several times so I’m pretty sure my setup is fine:

  • appinfo element is added to the page and is always visible
  • appinfo refresh workflow runs in a “Do when entire page is loaded” event
  • OneSignal API keys are added in the plugin
  • when i print the outputs of appinfo in a text box, everything appears except OneSignal Player ID (OneSignal Push Token returns a valid output)
  • Push Notification workflow runs when a particular button is clicked
  • i dont get a no notification because there’s no player ID
  • When I test on TestFlight, I make sure to uncheck Preview mode on the push notification workflow

What am I missing? Wonder if this has to do with my iOS version? (i’m on iOS 15.6.1)

Thanks :slight_smile:

cc @gaurav

Update Oct 10 2022: there’s an issue with my iOS version (15.6.1). It works fine on other iOS versions including 15.6.0.

1 Like

Hmmm weird. And it sounds like you’ve added your OneSignal key to the plugin page itself within the editor, not just the element editors.

Have you reached out to @gaurav via his chat? He’s usually quite responsive and very helpful.

Reached out to him, thought I’d post here in case I get a faster response (Gaurav and I are different timezones and I usually hear back from him the next day)

Am I supposed to create users on One Signal first? Or is the plugin supposed to create new users (and their respective Player IDs) on OneSignal automatically?

You’re not supposed to create them, it should happen automatically when they download your app. So you are getting push notifications sometimes?

Nope, not getting any. and onesignal dashboard doesnt show any users

Interesting I got the iOS working 100% but I’m struggling with Android. Where you able to get android player ID?

I am also getting no value for Player ID. I have put in the refresh workflow and adding the onesignal player id to my player id field in user database. Do you have any suggestions?

nvm, figured it out. The device info element must be visible and mine was not