Is there any sample worklight push notification project with FCM? - ibm-mobilefirst

is there any sample worklight push notification project with FCM not GCM? so could you please give me any link where i can download.

The sample for GCM or FCM is the same one. The only thing that differs is the FCM setup steps (which now supersede those for GCM, so essentially you have only FCM).
The setup steps are mentioned here: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/notifications/sending-notifications/#google-cloud-messaging--firebase-cloud-messaging
Visit the Firebase Console.
Create a new project and provide a project name.
Click on the Settings “cog wheel” icon and select Project settings.
Click the Cloud Messaging tab to generate a Server API Key and a Sender ID and click Save.
As mentioned, the sample is the same sample:
For Cordova: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/notifications/handling-push-notifications/cordova/
For Android: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/notifications/handling-push-notifications/android/
if you are using older releases, the setup steps are the same.

Related

not able to receive push notification on ios device

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.

How to push notification remotely with React-Native-Push-Notification?

I am new at mobile app developing, and i have been looking into push notification and , i understand that you have local notification, static on the device and remote notification, send from a notification server (which is not the application server), i am trying to use
this library, quite a popular one for doing push notification:
https://github.com/zo0r/react-native-push-notification
I can understand how to set it up in the react native project and use local notification since i found a specific tutorial for it, but the tutorial only show how to use the local notification.
I have been searching for more documents on how to use this library for remote notification step by step, from setting up the notification server to use it in the react native app, but they are all so vague explanations or use different tools.
You can use services such as oneSignal & FCM. Here are some libraries for push notification
https://github.com/geektimecoil/react-native-onesignal (one signal)
Tutorial : https://medium.com/differential/react-native-push-notifications-with-onesignal-9db6a7d75e1e
You can use the below library for FCM if you need any other firebase services such as authentication, dynamic links etc.. go for this
https://github.com/invertase/react-native-firebase (fcm)
If you just need only push notification services, you can use
https://github.com/evollu/react-native-fcm
Some helpful blogs for the integration
https://medium.com/react-native-training/react-native-push-notifications-with-amazon-pinpoint-ios-b2efa89ced32
https://medium.com/differential/how-to-setup-push-notifications-in-react-native-ios-android-30ea0131355e
Firstly go to rnfirebase and follow the process..
You will have do stuffs like yarn add (app/messaging), pod install, some changes in podfile, configure appDelegate.m firapp, notification etc.. and then mostly the problem comes with developer.apple.com
YES, you compulsory require developer account
Create identifier with push notification checked
-> Using key chain generate => Certificate Assistat > Request A Certificate from Certificate Authority to create certificate in below steps.
-> Press Configure on push notification and create certificate which will create apple push services for both development and production for release and debug and download and click it on add on keychain
-> Generate .p12 file of both certificate release and production using Keychain all you have to do it click in the certificate you just add on keychain you can verify with expiry date if is confusing... then right click export to create .p12 file put password that you wont forget
-> Put your .p12 file on Firebase Cloud Messaging under project settings > cloud messaging (Here you will need the password you set)
-> go to user developer account and create profiles both IOS development and App Store and please select the required certificate while creating AppStore Production profile
-> Now run app using development profile on Xcode and Archive using production/distribution profile
-> Test notification using Cloud Messaging Notification tools provided by firebase if it work it works if it don't check then above step throughly

IBM MobileFirst Appcenter - How to update application details added from public appstore (Google play Or Apple store)

I am using the MobileFirst platform 6.3 appcenter. I am able to add applications from public app stores such as Google Play or Apple App Store by entering their URLs. While adding application, Appcenter automatically fetches all the information like version, icon, description, vendor etc.
Once application added, these details remains as it is until someone changes it manually from appcenter admin console.
Is there anyway to update external application details automatically in the appcenter? Or is there any third party tool available which I can use for updating details?
You will have the click the APP from the AppCenter console and click Apply/OK to update the properties.

PushSharp - GCM Authorization Failed

Using v4.0.10 of Pushsharp (nuget package), I am getting error GCM Authorization Failed when sending push notifications to Android devices.
Seems the bug raised in issue 574 (https://github.com/Redth/PushSharp/issues/574 ) has been compiled into the nuget package, yet I'm still getting this error.
Could this be related to the introduction of Firebase Cloud Messaging?
Does anyone still have success using GCM?
As of right now, GCM is still usable. However, it is highly encouraged for new users to use FCM instead. Either way, for both GCM and FCM, you must use a Server Key generated from the Firebase Console. There is a visible note in the GCM docs saying:
Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.
The Authorization error has been encountered by number of users, some also had an old project. See my answer here for more details.
The sender id used in the app code needs to match the sender id Firebase Cloud Message Console and its corresponding "Firebase Cloud Messaging token".
Thank you #AL for your help.

How to configure Android Push Notifications (GCM) in Appcelerator Titanium Dashboard?

I've tried to following the instructions
Configuring push services for Android devices
However, the steps mention 'Click Push Notifications on the left-side navigation' but they don't exist...
Once you've created a Google API project with GCM enabled, you need to update your application's settings page in Dashboard with the API key and sender ID you generated.
To configure Arrow for push notifications using Dashboard:
Open Dashboard and select your application from the Apps drop-down menu.
Click Push Notifications on the left-side navigation <-- MISSING.
Select the Android Push tab.
Enter the server key in the GCM API Key field and the GCM sender ID in the GCM Sender ID field.
Here's a screenshot to show what's listed...
If I look under Arrow (where I suspect it might be expecting to be listed) that's empty (I'm not using Arrow - I thought it was an alternative UI using declarative XML)...
I've checked the subscription that I'm on (Indie) and it shows that I should have the ability to send up to 1 million push notifications for free..
Does anyone know how I can associate the Appcelerator Titanium project to the GCM server key??
Also, when I looked in Googles developer console, my application (which is live on their app store) wasn't listed, so I've created a new application called 'Gcm'. The Appcelerator Titanium seemed to confirm that I needed to 'create' the application, I was just too worried to call it the same name as the live application. How does the 'Google Developer Console' Application relate to the 'Google Play' application?! - if at all?
UPDATE
I've just discovered in TiApp.xml that I can enable some 'Cloud' settings and this has unlocked the 'Push' menu - so I think all is good now, could someone confirm that this is the right thing to do and answer my related question about Google play applications v google developer console applications?
Update 2
I started to get this error
[ERROR] : GooglePlayServicesUtil: The Google Play services resources
were not found. Check your project configuration to ensure that the
resources are included.
[INFO] : CloudPush.retrieveDeviceToken error: INVALID_SENDER
I'm simply calling this to try and register for Android push notifications ...
CloudPush.retrieveDeviceToken({
success : function(e) {
console.info("CloudPush.retrieveDeviceToken success");
},
error : function(e) {
console.info("CloudPush.retrieveDeviceToken error:"+e.error);
}
});
I have tried with and without the ti.cloud module (I think it got added when I clicked the 'Enable Services' button which meant that I could see the 'Push Notifications' tab, but it seems to still be listed whether the ti.cloud module is elected or not)..
Before..
Q - How to stop the Google Play error and retrieve the device token (oddly I was getting the token before enable services.
Q - Is ti.cloud used to receive the push notification, or is ti.cloudpush sufficient for this?
Thanks for the detailed question :) Let me go into some of the things you mention and clarify what I can.
If I look under Arrow (where I suspect it might be expecting to be listed) that's empty
As you later found out you have to enable platform services for your app which will create an ArrowDB app with the same name as your app. This app will have the Push Notifications in the sidebar to configure. I've updated the guide's wordings to make clear we mean the ArrowDB app, not the Titanium app.
(I'm not using Arrow - I thought it was an alternative UI using declarative XML)...
Don't confuse Arrow with Alloy - which is the MVC framework for Titanium which indeed uses XML.
How does the 'Google Developer Console' Application relate to the 'Google Play' application?! - if at all?
It doesn't. You can even have multiple apps share the same GCM sender.
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found.
What did you use to test? A Genymotion emulator without Google Apps installed perhaps? You'll need that.
Is ti.cloud used to receive the push notification, or is ti.cloudpush sufficient for this?
ti.cloud is the module to communicate with ArrowDB, subscribe to channels etcetera. On Android you need ti.cloudpush (or as #Shawn mentioned another module) to retrieve the device token where on iOS you can use a Ti. API for that. Follow this guide for all steps.
You can ignore the Google Play Service error, but it seems your GCM Sender ID and/or API Key is wrong. Read through the tutorial and make sure you put down the right ones.
If you are using Appcelerator Cloud Service to send push notifications, you need ti.cloud to register the devices.
To get the device token and to receive push notifications, you use ti.cloudpush. There are other modules that you can use instead of ti.cloudpush.