phonegap/phonegap-plugin-push

Unable to get full content of RegistrationID

hnguyen48206 opened this issue · 1 comments

Expected Behaviour

The result of this method returns object 'registration'

pushObject.on('registration')
      .subscribe((registration: any)

And being able to retrieve APNS token using registration.registrationId

Actual Behaviour

The value of 'registration.registrationId' is not completed which is a weird string as the following: {length = 32, bytes = 0x75779294 d0dee103 133b7468 af117475 ... 0850db08 b74d2cb9 }

Reproduce Scenario (including but not limited to)

I'm using this plugin in an IONIC 3 projects and have experience with it many times before without much trouble though this time what I want is APNS token only, not for Firebase usage so I do not include the Google.plist in the project.

Plugin version is 2.2.3

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Ionic:

Ionic CLI : 6.4.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.9.9
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 8.0.0
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 13 other plugins)

Utility:

cordova-res (update available: 0.14.0) : 0.11.0
native-run : not installed

System:

ios-deploy : 1.9.4
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.13.4
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version                                    # e.g. 6.0.0
cordova platform version android                     # e.g. 4.1.1

Plugin version

cordova plugin version | grep phonegap-plugin-push   # e.g. 1.5.3

Sample Push Data Payload

Sample Code that illustrates the problem

pushObject.on('registration')
.subscribe((registration: any) => {
console.log(�registration)
console.log(registration.registrationId)
});

Logs taken while reproducing problem

@hnguyen48206 Looks like this was fixed in 2.3.0:

#2788