Pushwoosh / pushwoosh-react-native-plugin

Other
57 stars 43 forks source link

Not receive notification iOS #119

Closed tuantvk closed 3 years ago

tuantvk commented 3 years ago

i use code example

import Pushwoosh from 'pushwoosh-react-native-plugin';

Pushwoosh.init({ 
    "pw_appid" : "YOUR_PUSHWOOSH_APP_ID" , 
    "project_number" : "YOUR_FCM_SENDER_ID" 
});
Pushwoosh.register();

// this event is fired when the push is received in the app
DeviceEventEmitter.addListener('pushReceived', (e: Event) => {
  console.warn("pushReceived: " + JSON.stringify(e));
  // shows a push is received. Implement passive reaction to a push, such as UI update or data download.
});

// this event is fired when user clicks on notification
DeviceEventEmitter.addListener('pushOpened', (e: Event) => {
  console.warn("pushOpened: " + JSON.stringify(e));
  // shows a user tapped the notification. Implement user interaction, such as showing push details
});

and check device on server PW

https://cp.pushwoosh.com/json/1.3/checkDevice

body request

{
    "request": {
        "application": "XXXXX",
        "hwid": "XXXX-XXXX-XXXX" // i replaced hw
    }
}

data return here

{
    "status_code": 200,
    "status_message": "OK",
    "response": {
        "exist": true,
        "push_token_exist": true
    }
}

but when i push notify, on ios 13.6.1 not receive notification. i have re-check device on server PW data return push_token_exist false.

{
    "status_code": 200,
    "status_message": "OK",
    "response": {
        "exist": true,
        "push_token_exist": false
    }
}
tuantvk commented 3 years ago

previously it still works, but when i rebuild app (not update PW) it not working

wfhm commented 3 years ago

@tuantvk it looks like a token is deleted from our database after sending a push. This usually happens when APNS responds with an error (like DeviceTokenNotForTopic). It could indicate that your build is signed with a provisioning profile that does not match your app's configuration in the Pushwoosh Control Panel. Please check that the provisioning profile type (development or distribution) matches the gateway used in the Configure tab (Sandbox or Production correspondingly) and that the app's bundle ID matches the ID of your push certificate.

Please let me know about the results.

tuantvk commented 3 years ago

I have check configure PW and my team changed it.