From 8b2328f4f04751536885d99c90fd0487c7726ddb Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Sun, 11 Jun 2017 09:11:16 -0400 Subject: [PATCH] fix example --- Examples/simple-fcm-client/app/App.js | 1 + Examples/simple-fcm-client/app/PushController.js | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Examples/simple-fcm-client/app/App.js b/Examples/simple-fcm-client/app/App.js index a7e5a7d..a571e28 100644 --- a/Examples/simple-fcm-client/app/App.js +++ b/Examples/simple-fcm-client/app/App.js @@ -30,6 +30,7 @@ export default class App extends Component { showLocalNotification() { FCM.presentLocalNotification({ + vibrate: 500, title: 'Hello', body: 'Test Notification', priority: "high", diff --git a/Examples/simple-fcm-client/app/PushController.js b/Examples/simple-fcm-client/app/PushController.js index f44cde8..9dbdc22 100644 --- a/Examples/simple-fcm-client/app/PushController.js +++ b/Examples/simple-fcm-client/app/PushController.js @@ -18,10 +18,12 @@ export default class PushController extends Component { console.log("TOKEN (getFCMToken)", token); this.props.onChangeToken(token); }); - - FCM.getAPNSToken().then(token => { - console.log("APNS TOKEN (getFCMToken)", token); - }); + + if(Platform.OS === 'ios'){ + FCM.getAPNSToken().then(token => { + console.log("APNS TOKEN (getFCMToken)", token); + }); + } FCM.getInitialNotification().then(notif => { console.log("INITIAL NOTIFICATION", notif) -- 2.26.2