How to get local-notification without Apns for ios in react-native? - react-native

I searched some notification library for react-native.
https://github.com/zo0r/react-native-push-notification
This works well for Android but it requires Apns for ios
I would like to find some libraries that doen not require Apns and simple.

There is no avoiding using APNS for remote push notifications.
In order to receive data in certain scenarios, such as having your app running in the background, phone being offline and later receiving a notification once it is back online, your device must have a unique app-specific device token generated by Apple. You can then use a service such as FCM or AWS SNS to deliver the notification to clients.
Also, for Android, you will need to use GCM to generate the device token.
You can, for testing purposes, you can use react-native-push-notifications' PushNotification.localNotificationSchedule to create a dummy local notification.
Here is a good tutorial for setting up remote push notifications with APNS and FCM: https://www.appcoda.com/firebase-push-notifications/.

Related

APNS handle obtained by Expo in React Native is incorrect

EXPO SDK Version: 42.0.01
Developing for: iOS
Our goal: successfully send a test notification from Test Send tool in Azure Notification Hub to a registered physical iPhone which is running a local instance of an EXPO app.
Progress: we're able to successfully register a physical iPhone with Azure Notification Hub without using a 3rd party library. We can see that registration in the Hub.
Issues: when using the Azure's Test Send tool we're getting an error "The Push Notification System handle for the registration is invalid" and the test notification does not get delivered.
Debugging:
we're using EXPO's Notifications.getDevicePushTokenAsync() API to obtain the push token.
Azure support team analysed the logs and concluded that the problem is the PNS handle i.e. Apple's ID of the phone registered for notifications.
the phone's PNS handle remains the same at all times.
by using "expo credentials:manager" I've added a new Push Notification Key using KeyID, TeamID and .p8 certificate - the PNS handle didn't change after doing that and notifications were failing too.
I haven't found any tools to validate the APNS handle. I'm currently awaiting a .p12 certificate from our corporate team to test notifications by using https://pushtry.com/.
How do we validate the APNS handle and if found that it's invalid - how do we cycle it / request another?
The PNS Handle from APNs does not change that often as it is tied to the device and app installation. See this answer for more details Does the APNS device token ever change, once created?

Firebase Cloud Messages never reach the device

I'm implementing FCM on Ionic 2 (AngularFire2 & Ionic Native FCM: cordova-plugin-fcm#2.1.2) currently testing iOS on an iOS 11 device.
FCM messages never arrive on the device. I get no errors from either the console sending messages or when sending messages via cURL.
I've gone through the troubleshooting steps from the Google dev advocate.
I've verified that a notification sent directly via Apple's APNS server gets delivered to the device when the app is in background, and the app when the app is in foreground. (I pulled the actual device token to test this.) i.e. APNS certificates are fine.
FCM initializes with no errors (watching the logs in Xcode) and FCM does retrieve a (seemingly) valid FCM token.
I've just ensured that all my npm modules are at the latest versions for firebase, angularFire2 and fcm.
I've verified that 'GoogleService-Info.plist' is in my resources folder
Bottom line: My APNS certificate is valid and seems to be correctly setup in the Firebase console. APNS direct messages work fine. FCM messages don't return an error, they just never get to the device. Seems to be getting lost in the FCM end.
Does anyone have any suggestions on how to further debug this?
thx.

Can I send videos to android devices using gcm?

If not please suggest me how to send videos to android devices using c#. Earlier I have succeeded using gcm I easily sent out pushnotifications to android devices. My doubt is can I sent videos to android devices using gcm?
As per my earlier comment, it is not possible to send large files via GCM (nor FCM) due to the payload size limit.
What I think you can use instead is make use of Firebase Storage, store the video from there, in the push notification, you can send a download URL, which your client app should handle.

What could cause ti.cloud to stop display Android Push Notifications (GCM) in status bar

I previously setup an Appcelerator Titanium project with push notifications (as per my Stack Overflow question How to configure Android Push Notifications (GCM) in Appcelerator Titanium Dashboard?) and for some months my Android app has been receiving the appropriate push notification from GCM, but I'm now receiving reports that this no longer works from end-users.
The flow usually goes like this...
Android app sends android push token to my Java server
Java server persists the Android push token
Java server sets up Amazon Web Service SNS endpoint for GCM and stores this endpoint for later use.
(some time passes)
Java server invokes Amazon Web Service SNS endpoint with a GCM payload
Amazon SNS passes message to Google GCM
GCM passes message to ti.cloud / ti.cloudpush
Phone displays push notification
The app does receive the push notification and I display an application dialog to show the contents of the message, but NO system-tray push notification is displayed, whereas I thought it was doing this in the past. No system sound is played either.
I can see that if the app is not running, then when the push notification is received the app is launched, but if the display isn't on (or locked) then the message will not be discovered for some time. I really need the native/system push notification to be in the tray.
Does anyone know why system / status notifications are not displayed? Should it be when using the ti.cloud / ti.cloudpush for Android?
Thanks
Rob.

Device Token null when deploying app as ad-hoc (Urban Airship)

I implemented the Urban Airship library into my application and I can successfully send push notifications to a specific device in development mode. After startup I get the device token and save it into a mysql database. However, when I use the app in ad-hoc mode, the device token is always (null).
APP_STORE_OR_AD_HOC_BUILD is set to YES
and the APP Key and APP-Secret for both production and development are correct.
Any ideas how to get the device token in ad-hoc/appstore mode?
Edit:
Identical question has been posted in the Urban Airship Forum.
For me also same thing happened. What we did to solve problem is just recreated new adHoc provisioning profile. Then we got alert asking to install push notification. Its one of the major issue in iOS push notification. We must configure push nofitiation SSL certificate before creating provisioning profile.