Push Notification does not work, BadDeviceToken

Please provide the following:

  1. SDK Version: 37
  2. Platforms(Android/iOS/web/all): iOS

Hi I’m getting the ios’s APNs token with Notifications.getDevicePushTokenAsync. I need to use this instead of the Expo Push Token, because I need to work with AWS SNS.

I got the APNs token and tried to send push notification to the device, but I received BadDeviceToken from the Apple End Point.

I’m trying this in real iPhone in TestFlight since I can only use getDevicePushTokenAsync in standalone mode.

I spent the last two days checking that my certificate and provisioning profile are correct.
I tried both having Expo creating the distribution certificate and provisioning profile for me and also tried creating them myself and it does not work.

I am also using the production push certificate.

Can anyone point me to the right direction?
BTW it works ok with Androird.