Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
109 stars 139 forks source link

BUG: RegisterDevice fires instantly #265

Closed jQrgen closed 6 years ago

jQrgen commented 6 years ago

Hey

pushwoosh.registerDevice has three issues in version 7.0.7:
  1. The success callback is called instantly before the native permission modal is clicked by user.
  2. Clicking 'Allow' in the native permission popup does not fire the success callback.
  3. Clicking 'Don't allow' in the native permission popup does not fire any callbacks.
Environment:
$ ionic info
cli packages: (/Users/Flare/flare/node_modules)
    @ionic/cli-utils  : 1.12.0
    ionic (Ionic CLI) : 3.12.0

global packages:
    cordova (Cordova CLI) : 7.0.1 
    Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:
    Cordova Platforms : ios 4.4.0
    Ionic Framework   : ionic1 v1.3.3

System:
    ios-deploy : 1.9.2 
    ios-sim    : 6.1.2 
    Node       : v6.11.2
    npm        : 3.10.10 
    OS         : macOS High Sierra
    Xcode      : Xcode 9.0 Build version 9A235 

Misc:
    backend : legacy

Related to: https://github.com/Pushwoosh/pushwoosh-phonegap-plugin/issues/263

wfhm commented 6 years ago

Hi,

Could you please provide us with device logs of Pushwoosh API requests? Can you see /registerDevice request firing in the logs? Also, which iOS version is affected?

wfhm commented 6 years ago

@jQrgen

This is an expected behavior. These callbacks are fired when a device receives or fails to receive a token from APNS. Push registration does not depend on the permissions granted by a user, as it only defines whether notifications will be shown or not when a push is received.

Please refer to the following thread for additional details:

https://stackoverflow.com/questions/39283968/getting-the-device-token-when-tapping-the-dont-allow-button-for-push-notifica