Commit 8b2328f4 authored by Libin Lu's avatar Libin Lu

fix example

parent 8f60cc28
...@@ -30,6 +30,7 @@ export default class App extends Component { ...@@ -30,6 +30,7 @@ export default class App extends Component {
showLocalNotification() { showLocalNotification() {
FCM.presentLocalNotification({ FCM.presentLocalNotification({
vibrate: 500,
title: 'Hello', title: 'Hello',
body: 'Test Notification', body: 'Test Notification',
priority: "high", priority: "high",
......
...@@ -18,10 +18,12 @@ export default class PushController extends Component { ...@@ -18,10 +18,12 @@ export default class PushController extends Component {
console.log("TOKEN (getFCMToken)", token); console.log("TOKEN (getFCMToken)", token);
this.props.onChangeToken(token); this.props.onChangeToken(token);
}); });
FCM.getAPNSToken().then(token => { if(Platform.OS === 'ios'){
console.log("APNS TOKEN (getFCMToken)", token); FCM.getAPNSToken().then(token => {
}); console.log("APNS TOKEN (getFCMToken)", token);
});
}
FCM.getInitialNotification().then(notif => { FCM.getInitialNotification().then(notif => {
console.log("INITIAL NOTIFICATION", notif) console.log("INITIAL NOTIFICATION", notif)
......
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