not able to receive push notification on ios device - firebase-cloud-messaging

I am implementing react-native-firebase to my app
i have followed steps from official document(https://rnfirebase.io/docs/v5.x.x/installation/ios) as well as some other similar blogs (https://medium.com/#anum.amin/react-native-integrating-push-notifications-using-fcm-349fff071591),
but I am not able to receive any notification on my real device,
I followed all steps excepts generating key's, ID, and provisioning as I had already these while publishing my app
i have tried to send a notification from firebase console like below
and from postman
it shows succeed but no notification on the real device
i have also tried with oneSignal it was showing some apns 3000 error with my device as below
I have tried below solutions like
1 changing search header path
2 link binary with library
3 re-creating provisioning profile
but nothing worked
I am expecting to just receive my first push notification I am
struggling from last three days please help.
the step i follow to integrate firebase are below,
1 Create ios Firebase Project and add the googleservice-info.plist into my project on the final step firebase was able to connect with my app as below SS
2 Install Native Firebase Core and Firebase Messaging Libraries (pods)
3 Install and Link react native firebase lib
4 i had already a key for APNs generated so i upload the .p8 file in firebase messaging setting with key ID and Team ID
5 i had already provisioning profiles which i generated at the time of app publish
6 finally i add pushnotification and remote capabilities and add some code in appdelegate h&m files as suggested in documentation

Updating XCode from 9.4 to 10.1 helped me to solve my issue
the issue was with some of my provisioning profile downloaded earlier
I had already published the same code with some UI changes with XCode 9.4 but I never receive any suggestions/warning from apple
but this time when I publish the app with updated XCode 10.1 I received below email from Apple which gave me the right direction to find the solutions
then i follow the below answer
Missing Push Notification Entitlement
and solve my issue by delete the all Provisioning profile on my local machine, then re-download and install the Provisioning profile from the Provisioning Portal.

Related

React native FCM push notifications not working in IOS Adhoc and TestFlight

Trying to implement push notification in a react native app using google cloud messaging. The notification works perfectly on android device in a simulator and in production. But for IOS, it works only locally only when its ran in a device. In adhoc or test flight, it does not work. I am using the APN key. Anyone faced the same issue? I can see a lot of posts in stack overflow regarding push notification not working for ios but none of the post were helpful for me.
Here's what I have done till now:
Generated an APN Authentication Key in developer.apple.com
Added that key to ios App in firebase.console.google.com
Run the app in a device using xcode - (Push notification works fine everytime.)
Archive the app in xcode and distribute to AdHoc and install the .ipa file in a device. (Push notification does not work)
Distribute to testflight and test the push notification - does not work
Why would it work in debug mode and not in adhoc or testflight.
I checked this:https://stackoverflow.com/a/48111671/8729976 . It says there is a single auth token for both production and development environment so I am guessing its definitely not the key.
Here are the sample responses:
When the push notification is delivered we get status 200 with this message: projects/myproject-name/messages/1602538922793273
When the push notification is not delivered, we still get status 200 with this message: projects/myproject-name/messages/0:1602541135340865%6b2d5f5c6b2d5f5c
Don't know what the second message means.

React Native Push Notifications doesn't receive notification

I have a React Native app (testing on iOS) and am trying to incorporate Push notifications. I am using the following module:https://www.npmjs.com/package/react-native-firebase-push-notifications.
I tried running example app code and am able to obtain
a (1) message token and (2) successfully obtain permissions from my device.
I am trying to send a test notification from Firebase and am using my device's token. However, nothing happens upon triggering a test notification. Any tips? I believe I followed the key upload instructions correctly (https://firebase.google.com/docs/cloud-messaging/ios/certs)
I hope you have uploaded pem/p8 file on firebase console at "Cloud Messaging" in Project settings. Check this image
I figured it out! Although I thought I had done this in the past, I did not have Remote notification enabled in background modes, nor did I have Push notifications checked in the Signing & Capabilities section of project setting on Xcode. Thank you!

Answering expo build and upload questions automatically

I’m trying to create an app generator that creates an expo app and then deploys it to the app store and play store.
I’ve done the generator part, now I have to do the deploy.
My question is, is there a way I can answer to expo-cli interactions in expo build and upload automatically? So I can set them before and then when the user generates the app, I can automatically in an aws instance deploy this app to my app store account?
I know that I can set apple id and password before, as I can set push key and provisioning key. But the first question “? How would you like to upload your credentials? (Use arrow keys)” I just can’t.
I just solved it myself with autoexpect!

No push notification on iOS with React-native-firebase. Invalid team id key id and APNs auth key combination when try to send from console

Notifications stopped working after I did 2 things:
1) created second project on firebase
2) updated react-native-firebase from 3.3.x to 4.3.x
I've wasted 2 hours debugging this and want to save time for other people.
The issue was that I didn't simply upload APNs Authentication Key for a new project and this step is hard to find but it should be the first thing you do if you face this problem.
Here is a link how to create APN auth key and other certificates for Push notifications https://firebase.google.com/docs/cloud-messaging/ios/certs
To upload APN auth key go to https://console.firebase.google.com/project/YOUR-PROJECT -> go to overview -> select ios app -> go to Cloud messaging

React Native Remote Notifications

So what are your experiences with sending remote notifications to RN app from FCM?
I did some research today, tried bunch of tutorials, but most of them didn't work.
So I wanna hear your opinion, which library are you using for this and what guide did you follow?
react-native-push-notification
react-native-fcm
react-native-firebase
react-native-onesignal
I did the connection a few days ago. It is not difficult but it requires a lot of configuration as notification is a native feature. I recommend you the following library that can help you:
React Native FCM
Also take in count the following things:
For ios you need get some certificates from apple.
This guide help with the setup and android part.
Remote notification can't reach iOS emulator since it can't fetch APNS token. Use real device.
I used to react-native-fcm, but now I use react-native-firebase, it is simple to use, just follow the documentation https://rnfirebase.io/docs/v5.x.x/getting-started
just follow the installation tab guide, cloud messaging tab guide, and notification tab, also you can find js code there. for IOS part, you need some extra work to add some certificate to your developer id and add some certificate to your firebase app.