Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit cd2038d

Browse files
author
Hans Govind
committed
Make sure to import PushNotificationIOS from react-native first
1 parent 81744d6 commit cd2038d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public class MainApplication extends Application implements ReactApplication {
127127

128128
## Usage
129129
```javascript
130+
import { PushNotificationIOS } from 'react-native';
130131
var PushNotification = require('react-native-push-notification');
131132

132133
PushNotification.configure({
@@ -141,7 +142,7 @@ PushNotification.configure({
141142
console.log( 'NOTIFICATION:', notification );
142143

143144
// process the notification
144-
145+
145146
// required on iOS only (see fetchCompletionHandler docs: https://facebook.github.io/react-native/docs/pushnotificationios.html)
146147
notification.finish(PushNotificationIOS.FetchResult.NoData);
147148
},

0 commit comments

Comments
 (0)