|
1 | 1 | # React Native Push Notifications
|
| 2 | + |
2 | 3 | [](http://badge.fury.io/js/react-native-push-notification)
|
3 | 4 | [](http://badge.fury.io/js/react-native-push-notification)
|
4 | 5 |
|
@@ -38,7 +39,7 @@ Having a problem? Read the [troubleshooting](./trouble-shooting.md) guide before
|
38 | 39 |
|
39 | 40 | The component uses PushNotificationIOS for the iOS part.
|
40 | 41 |
|
41 |
| -[Please see: PushNotificationIOS](https://facebook.github.io/react-native/docs/pushnotificationios.html#content) |
| 42 | +[Please see: PushNotificationIOS](https://github.com/react-native-community/react-native-push-notification-ios) for iOS installation and linking instructions. |
42 | 43 |
|
43 | 44 | ## Android manual Installation
|
44 | 45 |
|
@@ -125,7 +126,6 @@ In your `AndroidManifest.xml`
|
125 | 126 | </service>
|
126 | 127 | <!-- </Else> -->
|
127 | 128 | .....
|
128 |
| - |
129 | 129 | ```
|
130 | 130 |
|
131 | 131 | In `android/settings.gradle`
|
@@ -174,26 +174,26 @@ public class MainApplication extends Application implements ReactApplication {
|
174 | 174 | ## Usage
|
175 | 175 |
|
176 | 176 | ```javascript
|
177 |
| -var PushNotification = require('react-native-push-notification'); |
| 177 | +var PushNotification = require("react-native-push-notification"); |
178 | 178 |
|
179 | 179 | PushNotification.configure({
|
180 | 180 | // (optional) Called when Token is generated (iOS and Android)
|
181 | 181 | onRegister: function(token) {
|
182 |
| - console.log('TOKEN:', token); |
| 182 | + console.log("TOKEN:", token); |
183 | 183 | },
|
184 | 184 |
|
185 | 185 | // (required) Called when a remote or local notification is opened or received
|
186 | 186 | onNotification: function(notification) {
|
187 |
| - console.log('NOTIFICATION:', notification); |
| 187 | + console.log("NOTIFICATION:", notification); |
188 | 188 |
|
189 | 189 | // process the notification
|
190 | 190 |
|
191 |
| - // required on iOS only (see fetchCompletionHandler docs: https://facebook.github.io/react-native/docs/pushnotificationios.html) |
| 191 | + // required on iOS only (see fetchCompletionHandler docs: https://github.com/react-native-community/react-native-push-notification-ios) |
192 | 192 | notification.finish(PushNotificationIOS.FetchResult.NoData);
|
193 | 193 | },
|
194 | 194 |
|
195 | 195 | // ANDROID ONLY: GCM or FCM Sender ID (product_number) (optional - not required for local notifications, but is need to receive remote push notifications)
|
196 |
| - senderID: 'YOUR GCM (OR FCM) SENDER ID', |
| 196 | + senderID: "YOUR GCM (OR FCM) SENDER ID", |
197 | 197 |
|
198 | 198 | // IOS ONLY (optional): default: all - Permissions to register.
|
199 | 199 | permissions: {
|
@@ -288,7 +288,7 @@ EXAMPLE:
|
288 | 288 | ```javascript
|
289 | 289 | PushNotification.localNotificationSchedule({
|
290 | 290 | //... You can use all the options from localNotifications
|
291 |
| - message: 'My Notification Message', // (required) |
| 291 | + message: "My Notification Message", // (required) |
292 | 292 | date: new Date(Date.now() + 60 * 1000) // in 60 secs
|
293 | 293 | });
|
294 | 294 | ```
|
|
0 commit comments