I'm developing an iPhone application which uses Apple's push notifications. I've followed the steps listed here: https://parse.com/tutorials/ios-push-notifications and my device receives notifications when I run the app by connecting my device through Xcode. But, when I upload the app to Test Flight, the app fails to receive notifications. Upon further investigation, I found that the token returned by
NSString * token = [NSString stringWithFormat:@"%@", deviceToken];
is different when the app is run through Xcode, and different when it's run from Test Flight. Why is that? And how can I fix it? I'm using APNS to send push notifications.