Switching a single Pushwoosh application's configuration between the APNs Sandbox and Production environments can lead to configuration errors and unpredictable device registration behavior. This is because a device's push token is specific to the environment (Sandbox or Production) in which it was generated.
Recommended Solution: Use Separate Applications
The most reliable and recommended approach is to create two separate applications in your Pushwoosh Control Panel to isolate your development and production environments.
Create a Development App:
- In your Pushwoosh account, create a new application (e.g., "My App Dev").
- Configure this application for iOS using your Sandbox APNs certificate (
.p12) or an APNs Authentication Key (.p8). - In your app's development builds, use the Pushwoosh Application Code for this "Dev" app.
Create a Production App:
- Create a second application (e.g., "My App Prod").
- Configure it for iOS using your Production APNs certificate or the same
.p8key (as.p8keys are valid for both environments). - In your app's production builds (e.g., for TestFlight or the App Store), use the Pushwoosh Application Code for this "Prod" app.
This method prevents conflicts and ensures that devices are always registered with the correct environment and receive notifications reliably.
Troubleshooting Common Issues
If you must continue with a single application setup, here are some common issues and solutions:
Certificate Configuration Error: If you receive an error while uploading your
.p12certificate during reconfiguration, it may be a temporary issue. Please try uploading the certificate and its password again. We also highly recommend migrating to token-based (.p8) authentication, as it does not expire and simplifies configuration.Inconsistent Device Registration: When you switch the gateway in the Pushwoosh panel, devices that were registered in the previous environment may not automatically re-register or may become unreachable. A fresh install of the app on the device is often required to force a new registration with the correct environment.
Comments
0 comments
Please sign in to leave a comment.