Get your iOS device push token
When adding notifications to your iOS app using the WP-AppKit Pushwoosh Addon, you may need to know your device push token.
If you use Xcode you can get it from your app logs, as explained here: http://docs.pushwoosh.com/docs/ios-faq#how-do-i-obtain-my-ios-device-push-token-to-use-in-test-devices
If you don’t use Xcode, you can get it by using the cordova pushwoosh plugin api function “getPushToken()” that you’ll have to (temporarily) add directly to your app javascript code (in your WP-AppKit theme’s functions.js), as follows:
if ( typeof cordova !== 'undefined' ) { var pushNotification = cordova.require( 'pushwoosh-cordova-plugin.PushNotification' ); pushNotification.getPushToken( function( token ) { alert( 'Push token: ' + token ); } ); }
This will display your push token when you launch your built app on your device, provided you have the PushWoosh Addon activated for the app and correctly configured iOS push certificates.