Commit 389585f8 authored by Libin Lu's avatar Libin Lu Committed by GitHub

Create README.md

parent c71a2ba5
...@@ -15,6 +15,16 @@ ...@@ -15,6 +15,16 @@
- Run `npm install react-native-fcm --save` - Run `npm install react-native-fcm --save`
- Run `react-native link react-native-fcm` (RN 0.29.1+, otherwise `rnpm link react-native-fcm`) - Run `react-native link react-native-fcm` (RN 0.29.1+, otherwise `rnpm link react-native-fcm`)
## Configure Firebase Console
### FCM config file
In [firebase console](https://console.firebase.google.com/), you can:
- for **Android**: download `google-services.json` file and place it in `android/app` directory
- for **iOS**: download `GoogleService-Info.plist` file and place it in `/ios/your-project-name` directory (next to your `Info.plist`)
Make sure you have certificates setup by following
https://firebase.google.com/docs/cloud-messaging/ios/certs
## Android Configuration ## Android Configuration
- Edit `android/build.gradle`: - Edit `android/build.gradle`:
...@@ -175,8 +185,6 @@ pod install Firebase/Messaging ...@@ -175,8 +185,6 @@ pod install Firebase/Messaging
2. Follow the `README` to link frameworks (Analytics+Messaging) 2. Follow the `README` to link frameworks (Analytics+Messaging)
### Shared steps ### Shared steps
Make sure you have certificates setup by following
https://firebase.google.com/docs/cloud-messaging/ios/certs
Edit `AppDelegate.h`: Edit `AppDelegate.h`:
```diff ```diff
...@@ -221,7 +229,7 @@ Edit `AppDelegate.m`: ...@@ -221,7 +229,7 @@ Edit `AppDelegate.m`:
+ } + }
``` ```
### Xcode post installation steps ### Add Capabilities
- Select your project **Capabilities** and enable: - Select your project **Capabilities** and enable:
- **Push Notifications** - **Push Notifications**
- **Keychain Sharing** - **Keychain Sharing**
...@@ -229,12 +237,6 @@ Edit `AppDelegate.m`: ...@@ -229,12 +237,6 @@ Edit `AppDelegate.m`:
- In Xcode menu bar, select *Product* > *Scheme* > **Manage schemes**. Select your project name Scheme then click on the minus sign **―** in the bottom left corner, then click on the plus sign **+** and rebuild your project scheme. - In Xcode menu bar, select *Product* > *Scheme* > **Manage schemes**. Select your project name Scheme then click on the minus sign **―** in the bottom left corner, then click on the plus sign **+** and rebuild your project scheme.
### FCM config file
In [firebase console](https://console.firebase.google.com/), you can:
- for **Android**: download `google-services.json` file and place it in `android/app` directory
- for **iOS**: download `GoogleService-Info.plist` file and place it in `/ios/your-project-name` directory (next to your `Info.plist`)
## Setup Local Notifications ## Setup Local Notifications
NOTE: local notification does NOT have any dependency on FCM library but you still need to include Firebase to compile. If there are enough demand to use this functionality alone, I will separate it out into another repo NOTE: local notification does NOT have any dependency on FCM library but you still need to include Firebase to compile. If there are enough demand to use this functionality alone, I will separate it out into another repo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment