The "BadDeviceToken" error typically indicates a problem with the device token used for sending the push notification. Common causes include:
- APNS Environment Mismatch: Ensure the Apple Push Notification service (APNS) environment configured in your Pushwoosh application settings (Sandbox or Production) matches the environment used by your iOS app build. Development/debug builds usually use Sandbox, while TestFlight and App Store builds use Production.
- Testing Environment: Testing push notifications for an iOS application via the TestFlight app on a macOS device can lead to this error. Simulators and macOS TestFlight installations may not correctly register for or receive APNS push notifications through services like Pushwoosh.
Resolution:
- Test on a Physical iOS Device: The most reliable way to test push notifications for your iOS app (including TestFlight builds) is to install and run it on a physical iPhone or iPad. Testing on a real device ensures proper registration with APNS.
- Verify Environment Configuration: Double-check that the APNS certificate or .p8 key uploaded to Pushwoosh corresponds to the correct environment (Sandbox or Production) for your build type.
Comments
0 comments
Please sign in to leave a comment.