Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

iOS13 APNS Device Token #2926

Open
xinfengmich opened this issue Jun 15, 2020 · 2 comments
Open

iOS13 APNS Device Token #2926

xinfengmich opened this issue Jun 15, 2020 · 2 comments

Comments

@xinfengmich
Copy link

const pushObject: PushObject = this.push.init(options);

pushObject.on('registration').subscribe((registration: any) => {
  console.log('Device registered', JSON.stringify(registration));
  // send registration.registrationId with device info to backend server. 
}

Expected Behaviour

Get a 64-character hexadecimal string as the following:
Device registered
{"registrationId": "ff37d7e6a223f0014d5409de0b42ffeb16e3059dedcb425b2546f1ada14cd71d",
"registrationType":"APNS"}

Actual Behaviour on iOS 13 and above:

{"registrationId":"{length=32,bytes=0x1f4a86af45959a8947c460dc00262c89...5d57ad5e31d7f9b9}","registrationType":"APNS"}

We need correct registrationIds to save to our Push Server.
Refer to https://nshipster.com/apns-device-tokens/

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version ( iOS 13 + )

Cordova CLI version and cordova platform version

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 5.1.1

Plugin version

"phonegap-plugin-multidex": "1.0.0",
"phonegap-plugin-push": "2.2.3",
@xinfengmich
Copy link
Author

Seems I need upgrade to 2.3.0 based on f1f1ce8

@ghost
Copy link

ghost commented Aug 10, 2020

the same issue ( I`ve installed ver. 2.3.0 )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant