-
Notifications
You must be signed in to change notification settings - Fork 293
Not able to receive remote notification #401
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
Comments
iOS simulator not supported to Push notification. If you want to test you need to check on real iOS device. |
Ok thanks for the reply, I'll take a real device. Can you tell me if the request from the server and client side with react native I make is correct? Thanks |
Guys i managed to get the push notification working finally (with a real device), for IOS it was necessary to add the "notification" field, and using it as the "data" for android, so: {
"registration_ids": ["ejXQlECjCeI:APA91bE7oaUhaFnGyl77lFrySdEaWxocM0oj81uNezACX1wsZXiTyL4OYo5ssvFjjWYpFymMVyqBccboVcwTTW2rvykOmV_CABDM7rTIRCiJFl_9ngf7SrDSYoFouwNj69JSwlH....."],
"data": {
"title": "Breaking News",
"message": "New Story available."
},
"notification": { // only for ios devices
"title": "Breaking News",
"message": "New Story available."
},
"priority":"high"
} This will trigger the Very important: I use a M1 MacBook Air and also for the simulator the push notification are working (not just real device). The only problem so was the missing |
|
Uh oh!
There was an error while loading. Please reload this page.
Hi, I'm totally lost. I can't receive push notifications via the IOS simulator but I can receive the notification in Android.
Here are the steps I took:
I added also the capability in Xcode (Background Mode[remote notification] and Push notifications)
i subscribe with my bundle id the app on Firebase
I added the APNs token on Firebase
I added the GoogleService-info on the project
I register the APP ID (with my bundle id app) on the developer apple account
client part:
PS: is it sufficient to receive push notifications in the client part? Or i need to integrate another libs?
with this code I am able to take the user token:
Server side:
I use this token in the server part like this:
response:
I use finally the registration token to send the push notification to the client:
response:
But, even if the the request was successfull, in the client side i never receive the push notification, never.
Where am I wrong? In which of these steps am I doing something wrong?
The text was updated successfully, but these errors were encountered: