Skip to content

Instantly share code, notes, and snippets.

@ricardokdz
Created July 11, 2016 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricardokdz/428a7f522a313770193f45e9104e2c85 to your computer and use it in GitHub Desktop.
Save ricardokdz/428a7f522a313770193f45e9104e2c85 to your computer and use it in GitHub Desktop.
// main.js
function onDeviceReady () {
require('./components')
checkConnection()
checkLocationStatus()
const push = PushNotification.init({
android: {
senderID: '1037852817999'
},
ios: {
senderID: '1037852817999',
alert: true,
badge: true,
sound: true,
gcmSandbox: true,
}
})
}
document.addEventListener('deviceready', onDeviceReady, false)
// whatever.js
push.on('notification', function(data) {
console.log(data.additionalData)
});
push está disponível?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment