80 likes | 93 Views
Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user reengagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app. Guide to setup up Firebase Cloud Messaging for iOS and Android.
E N D
Tutorial: Guide to setup up Firebase Cloud Messaging for iOS and Android Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost. Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user reengagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app. You need an iOS device and Apple Developer account to test push notifications and wont work on Simulators. 1. Creating a Project in FCM Console 1. Goto Firebase Console and click on CREATE NEW PROJECT
2. Click on Project Settings Gear Icon and goto project settings. 1.2. How to add an iOS App to FCM Project
1.Select Add Firebase to your iOS app and enter the bundle id, nickname and click ADD APP. 2.Add the downloaded GoogleService-Info.plist into the root of your Xcode project by selecting all Targets.
3. Pod installation steps 1. Create a pod file if you don't have one $ pod init 2. Open you pod file and add pod 'Firebase/Core' 3. Save the file and run $ pod install 4. 4.Finish the setup!
5.Upload the .P12 file 6.Copy the Firebase Cloud Messaging Token or Server Key(deprecated, but works) and give it to server team for Server Side implementation. 7.Goto FCM iOS Setup Guide. Download Sample iOS Code
1.3. How to add an Android App to FCM Project 1.Select Add Firebase to your Android app and enter the Package name, nickname and click ADD APP.
2.Add the downloaded GoogleService-Info.json into the module root directory of your Android App. 3.Gradle Steps 1. Project-level build.gradle (project/build.gradle) classpath 'com.google.gms:google- services:3.0.0' 2. App-level build.gradle apply plugin: 'com.google.gms.google-services' 3. Finally, press "Sync now"in the bar that appears in the IDE 4.Finish the setup!
5.Copy the Firebase Cloud Messaging Token or Server Key(deprecated, but works) and give it to server team for Server Side implementation. 6.Goto FCM Android Setup Guide. Download Sample Android Code