I'm trying to create a messenger app with React Native and firebase for iOS, but I'm unsure of what route to take in order to enable remote push notifications every time a message is received. Every route I've looked at seems to require xCode to configure capabilities or requires me to edit a AppDelegate.m file, however I am developing on a PC so I'm not able to use xcode. I test the iOS app using expo and a physical iPhone. Is there any way to enable push notifications for my create-react-native iOS app under my specific circumstances of using a pc for development and firebase for my backend?
Is your app detached/ejected?
An undetached EXPO project doesn't support adding native libraries so the only way you can do push notifications is through the Expo push notification system. You may be able to get your firebase API to push data to a remote url using a webhook - in that case you can simply push a message to Expo's push notification endpoint once a user has completed an action, but you will need to find a way to store and retrieve their expo push notification token.
https://docs.expo.io/versions/latest/guides/push-notifications is the documentation for push notifications and https://exp.host/--/api/v2/push/send is the endpoint to hit to send a push notification.
There are some SAAS products out there that allow you to remote into a mac which you could try to use to setup your detached xcode project and then build using Microsoft App Center or something similar from that point on but the complexity increases.
Related
I'm using react-native-push-notification.
I'm trying to test push notifications, if I build app and upload it to testflight it shows remote notifications just fine, but when I do it with xcode build on a real device it doesn't react at all (I'm getting onRegister call and notification token though). This problem is only on IOS, android getting notifications in production and development. Can't google anything related so probably I'm missing something.
P.S. I'm using backend to send notifications through firebase
you have to go in capaibility in xcode and active PushNotification first
for more info see this
hope you have followed all the steps to get the APNS certificate and attached that to your xcode, before the build, if not please do so.
Also, in addition you need to have .pem file to add to your Firebase to make your ios app enable to send and receive push.
I am developing a Cordova application using HTML and Javascript (Not Ionic). I need the app to receive the push notification.
I used OneSignal Cordova Push Notification Plugin to implement the push notification functionality. https://www.npmjs.com/package/onesignal-cordova-plugin
I followed the same steps mentioned in one signal to implement the push notification in Cordova https://documentation.onesignal.com/docs/cordova-sdk-setup
For android, I'm getting the notification without any issues but for iPhone, I'm not getting any push notification. I followed the steps as mentioned in the onesignal documentation like how to upload the apple cirtificate, other settings that I need to make in the app, etc.
When opening the app on the iPhone it is not asking for notification permission too.
Is there anything that I'm missing to implement? or is the plugin correctly working for iOS?
Implement push notifications in iOS with firebase and everything works very well if I install the application like this:
ionic cordova run ios -l -c -s
Ask for the permissions and also send the notifications correctly. However, when I install the application from Xcode, I do not receive the alert for the permissions, nor do I receive the notifications. From the Firebase console, I do not get any error either.
Note for users of Xcode 8 and higher.
If you're using the latest version of Xcode, you will likely need to activate the Push Notifications capability before your app is able to receive notifications.
To do this, simply navigate to the Capabilities section in your app's overview within Xcode and toggle Push Notifications
Important: Use Auth certification(p8) instead p12 ssl
I am trying to using firebase push notification for IONIC 1. I am able to do it successfully in android. But in iOS i am able to add the FCM plugin and build it successfully. While opening the mobile app it ask for push notification permissions also.
But, when i try to send from the firebase notification. I am not able to receive notification in mobile.I have added the .plist to the project root directory and build it.
Do i need to do any configuration for IONIC 1 iOS?
Enable Push Notification in capabilities in XCode if your are using XCode 8 or higher.
Followings from Ionic site
Note for users of Xcode 8 and higher.
If you're using the latest version of Xcode, you will likely need to activate the Push Notifications capability before your app is able to receive notifications.
To do this, simply navigate to the Capabilities section in your app's overview within Xcode and toggle Push Notifications, as seen below.
I am developing a Phonegap application for both Android and iOS and would like to enable push notifications for both.
The app is using the Phonegap plugin PushPlugin which sets it to receive notification for both Android and iOS.
I am having issue with the iOS version of the app. When running it, I get the screen asking if I want to allow the app to receive notifications, I select yes then I receive a device token which is then used on the server side to send the notification to the selected device. This was a good indication that the Phonegap plugin was working.
Server side, I am using AmazonSNS to send the notifications. (Java code of this can be downloaded here.)
With AmazonSNS I need to pass in:
certificate (created in the online iOS development center)
private key (exported from the certificate)
device token (from PushPlugin)
to send the notification.
I followed this detailed tutorial on how to get the app id, certificate, private key and provisioning profile all set up.
The problem is, after sending the notification, not only does the app not receive the notification, but sending the notification doesn't error or give me any feedback as to what might have went wrong.
I'll also point out, the Android version of the app is successfully receiving notifications using the same java code.
Any advice on what the issue here might be would be great.
Thanks
I managed to work out what the problem was.
In my server-side plugin, I was trying to connect to APNS directly, but what I should of been doing was connecting to APNS_SANDBOX.