我正在开发一个使用Apple推送通知的iPhone应用程序。我已按照此处列出的步骤操作:https://parse.com/tutorials/ios-push-notifications并且我的设备通过Xcode连接我的设备来运行应用程序时会收到通知。但是,当我将应用程序上传到Test Flight时,应用程序无法收到通知。经进一步调查,我发现,通过令牌iOS didRegisterForRemoteNotifications从测试航班运行时返回不同的标记
NSString * token = [NSString stringWithFormat:@"%@", deviceToken];
当它从试飞运行返回的不同,当应用程序通过Xcode中运行,并且不同。这是为什么?我该如何解决它?我正在使用APNS发送推送通知。
设备令牌可以更改,所以您的应用程序每次启动时都需要重新注册。 – Vaisakh
@vais:应用程序每次启动时都会重新注册。 –
检查http://stackoverflow.com/questions/19524942/ios-7-device-token-is-different-for-same-device这,阿维的答案是绝对正确的.. – Vaisakh