Is there a way to determine if a device token is sandbox or distribution? We are testing and the application is sometimes signed with a development certificate and others are signed with an ad hoc certificate(distribution certificate). This is because we are passing the application around to some of the 100 provided ad hoc test devices, and also building development signed apps to our devices. Because sending a push notification requires that we select the appropriate push server and pem file, it would be great to be able to determine if the token is sandbox or distribution to send the notifications in the appropriate way so that the push notification succeeds. We must sometimes use the distribution profile to sign our applications, so testing the push notification system requires us to deliver these notifications properly.
#if !TOKEN_ENV_SANDBOX
NSLog(@"TOKEN_ENV==PRODUCTION");
#endif#if TOKEN_ENV_SANDBOX
NSLog(@"TOKEN_ENV==SANDBOX");
#endif
EDIT: Corrected an issue above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With