Tag: 特设分发

苹果推送通知不适用于专门构build而不是开发

在开发模式下,我可以发送推送通知到设备,而不是在生产中,我的设置是: – >我已经从configuration门户网站下载了aps_production.cer证书,然后双击aps_production.cer安装的钥匙串访问权限,最后从密钥链访问中获得私钥,当时它询问密码我给了一些像“admin”这样的密码。 – > openssl pkcs12 -in CertificateName_pro.p12 -out CertificateName_pro.pem -nodes – >苹果服务器apn:“gateway.push.apple.com”与2195端口 – >问题是我的rails应用程序发送通知,并没有收到任何错误,但没有到达设备上。 – (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { NSString *deviceTokenStr = [[[[deviceToken description] stringByReplacingOccurrencesOfString: @"<" withString: @""] stringByReplacingOccurrencesOfString: @">" withString: @""] stringByReplacingOccurrencesOfString: @" " withString: @""]; } simplepush.php <?php // Put your device token here (without spaces): $deviceToken = 'deviceTokenStr'; // […]