Description:
I installed react-native-onesignal's example app. Linked it and got it running successfully, but it always has the pushToken as _null_ in iOS.
Environment
Platform : "iOS 12.0"
"react": "16.8.6",
"react-native": "0.60.5",
"react-native-onesignal": "^3.5.0"
Steps to Reproduce Issue:
Hello,
We just released a new version of the example app. Can you please test again?
Hi @rgomezp
Yes I tried the new version 3.6.0. The push token is still coming null. The first time the _/players_ API is hit, device ID comes as null in response.
It always gives me this error "Apns Delegate Never Fired" in the dashboard, when building the debug/release app through Xcode(11.2.1).
But idk why it works great when the app is distributed through TestFlight.
Howdy,
It sounds like you may not have set up your certificates correctly.
Please see our instructions here and make sure you select both Production AND Sandbox
Hey @rgomezp ,
These certificates are configured. I've been using this for the past three months. And it was working great!
So, can you please tell me what changes are there from your end due to which maybe I need to reconfigure the certs?
Hi @rgomezp, I'm also experiencing the same issue on iOS (token is always null / seeing Apns Delegate Never Fired in dashboard). Works great when I'm running on Android though.
I've tried recreating the certificates several times (both manually and through the automated tool you provide). Is there anything I can do to help debug or otherwise verify that it is the certificate causing the issue? Been all through your troubleshooting docs last couple days to no success.
Also, not sure if this is related or not, but after going through your automated certificate wizard, the final instructions in that tool for "Refreshing your provisioning profile" (here is the link), Seem very out of date and I couldn't follow them directly. I'm using an automatic signing in xcode and feels like it picked things up just fine without any kind of manual refresh though.
Turns out was user error on my end. In xCode, while I did have the background mode -> remote notifications capability enabled, I had forgotten to explicitly add the Push Notification capability.
The latest xcode UI makes it easier to forget this since it's different from the one shown in the onesignal docs, and in this new UI, the capabilities don't show up unless they are explicitly added.
Probably would have caught this very quickly in the old UI where each capability was always explicitly shown with it's own on/off switch. Hopefully this will help you as well @veris-NikhilSrivastava.
Glad to hear you were able to resolve @ryanhobsonsmith
@veris-NikhilSrivastava , could you please respond if this is the same issue you were having?
@rgomezp this is not the issue I'm facing. And yes, I have the Push Notification capability added.
As I mentioned, it works flawless in the production version when distributed through TestFlight or AppStore. But it does not works in debug or release build distributed through xCode.
Fixed my issue by removing the call to the configure function. I was having the same issue when I updated to the latest version in order to support iOS 13. Was getting null for pushToken and the OneSignal dashboard Users section was displaying "Apns Delegate Never Fired". Turns out I never ended up removing the configure function that had been deprecated/removed from the SDK in one of the versions between my previous one and the latest. Once I removed it, everything started working fine.
@veris-NikhilSrivastava , please try @varuncarkey 's solution. Thanks for that suggestion!
@rgomezp @varuncarkey Thanks. It worked!
Most helpful comment
Fixed my issue by removing the call to the configure function. I was having the same issue when I updated to the latest version in order to support iOS 13. Was getting null for pushToken and the OneSignal dashboard Users section was displaying "Apns Delegate Never Fired". Turns out I never ended up removing the configure function that had been deprecated/removed from the SDK in one of the versions between my previous one and the latest. Once I removed it, everything started working fine.