pushy / pushy-react-native

The official Pushy SDK for React Native apps.
Apache License 2.0
16 stars 20 forks source link

Unable to receive notification #88

Closed samadRopstam closed 8 months ago

samadRopstam commented 8 months ago

i have registered the device and got the device token but when trying to send notification from pushy dashboard it gives the following error.

"No devices matched the specified condition. Please double-check the device token(s) or Pub/Sub topic(s), and that you are authenticating using a Secret API Key assigned to the Pushy app of the recipient device(s)."

pushy commented 8 months ago

Hi @samadRopstam, Please ensure your Pushy dashboard app is configured with the same Android package name and iOS bundle ID as your React Native app. It appears your device got associated with another Pushy dashboard app.

Alternatively, you can force association of your React Native app with a specific Pushy dashboard app using Pushy.setAppId().

Doing so overrides the default package name / bundle ID app identification scheme.

Find:

Pushy.listen();

Add below:

Pushy.setAppId('APP_ID');

Please populate your Pushy App ID (Pushy Dashboard -> Click your app -> App Settings -> App ID).

Then, re-run your app and re-register the device by calling Pushy.register(). You'll be able to send notifications to the new device token returned by this method from your Pushy dashboard app.

samadRopstam commented 8 months ago

Hello Pushy Team,

Thank you for the quick response. I have managed to send notification using the alternative method provided by you but I have verified in the app setting that the package name and the bundle ID is exactly the same used in my app and I am not able to send notification without the force association of app ID using Pushy.setAppId(). i have attached the screenshot of my app setting please have a look.

On Wed, Jan 3, 2024 at 6:00 PM Pushy @.***> wrote:

Closed #88 https://github.com/pushy/pushy-react-native/issues/88 as completed.

— Reply to this email directly, view it on GitHub https://github.com/pushy/pushy-react-native/issues/88#event-11378945936, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7PUFYLT33XN2GCOZJDSYK3YMVI6ZAVCNFSM6AAAAABBLASNYGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGM3TQOJUGU4TGNQ . You are receiving this because you were mentioned.Message ID: @.***>

pushy commented 8 months ago

Hi @samadRopstam, Please send your e-mail attachment to support@pushy.me and we'd be glad to assist you further.