あなたは、デバイスreadyイベントの後にこれを書くこのplugin
if (device.platform == 'iOS'){
pushNotification.register(
tokenHandler,
errorHandler,
{
"badge":"true",
"sound":"true",
"alert":"true",
"ecb":"onNotificationAPN"
});
}
}
を使用する必要があります。
function errorHandler(error) {
alert(error);
}
これはエラーコールバック機能です。
function tokenHandler(result){
// Your iOS push server needs to know the token before it can push to this device
// here is where you might want to send it the token for later use.
//alert('device token = ' + result);
sDeviceId = result ;
}
ここでは、デバイスIDを取得できます。
はこれを見るご参照くださいイオン2でプッシュ通知の詳細な理解のために
http://stackoverflow.com/questions/36717556/retrieve-the-device-token-from-device-using-ionic-フレームワーク –
グローバル変数 "device"を使用して、デバイスIDなどのプロパティにアクセスできます。 device.uuid –