【发布时间】:2015-02-20 02:43:40
【问题描述】:
直到我将我的应用程序提交到 App Store(现在可用)后,我才意识到分发令牌和生产令牌之间存在差异。在开发过程中,推送通知对我有用,但从 App Store 下载后,它不起作用。
我为开发和分发启用了推送通知。我已经创建了适当的开发和分发配置文件并启用了推送通知。
我的一些问题是:
既然应用程序已在应用商店中,我可以在我的 .php 文件中做些什么来允许推送通知而无需提交其他更新,即将 APNS 服务器位置从开发更改为生产?
我是否必须更改在 AppDelegate.m 中获取令牌的方式?现在我在didRegisterForRemoteNotificationsWithDeviceToken 中有这个:
NSString *token = [ [deviceToken description] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"<>"] ];
// Remove spaces from the token
token = [token stringByReplacingOccurrencesOfString:@" " withString:@""];
如何在 Xcode 中测试生产模式?我已经创建了 Ad-Hoc 证书。
谢谢
【问题讨论】:
标签: ios objective-c apple-push-notifications