在使用开发概要文件时,我成功地从APN中获得了令牌。当移动到Ad时,我从来没有从APN那里得到一个令牌,因此我无法将它发送到通知服务器。在阅读了Stackoverflow和正式文档(即重新创建的概要文件、证书等)上的所有帖子后,尝试了任何东西。现在,我试着用
协同设计-dvvvv --权利-- MyApp.app
命令,查看我是如何签署该应用程序的,并收到以下消息:
<dict>
<key>application-identifier</key>
<string>XXXXXXX.com.company.MyApp</string>
<key>aps-environment</key>
<string>production</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>XXXXXXX.com.company.MyApp</string>
</array>
</dict>这是一个特殊的代号吗?它不应该将UDID列表添加到配置文件中吗?还有什么其他的想法吗?谢谢!
发布于 2014-12-21 20:40:14
A.member中心
B.xcode 6.1.1
1.使用AppId配置项目
C.itunes 12.0.1.26
1.在itunes/应用程序中添加ipa文件
2.将设备连接到itunes itunes/ device (itunes向上)/Settings/Apps/将应用程序更改为“将安装”
3.synchronize
4.启动应用程序并获得推送通知令牌
D.KeyChain Access -export从证书'APN production iOS‘到使用密码123456的.p12 -> app_prod_apn_key.p12的密钥
E.JavaPNS 2.2 (或其他工具-使用生产苹果服务器)
下面的命令是: java JavaPNS_2.2.jar:log4j-1.2.17.jar:bcprov-jdk15on-151.jar xxxxxxxx75556f8b56da29082da5f0f05d3cac1166fc84b7efd411b7fxxxxxxx javapns.test.NotificationTest app_prod_apn_key.p12 123456 -run production complex
发布于 2017-02-01 10:49:07
如果您的任何人没有注意到同样的问题,请更改服务器代码的push url,APN使用AdHoc的生产配置文件,对于生产,您必须删除url中的沙箱,如下所述
if ($production) {
$gateway = 'gateway.push.apple.com:2195';
} else {
$gateway = 'gateway.sandbox.push.apple.com:2195';
}参考文献:http://codular.com/sending-ios-push-notifications-with-php
发布于 2013-02-06 06:44:50
对于特殊情况,您应该在生产APN中使用发布证书。如果仍然不能工作,请检查是否可以连接到生产、APN端口和ips的范围。“苹果技术说明”
https://stackoverflow.com/questions/14722797
复制相似问题