如何使用PushMeBaby样品送苹果推送通知? [英] How to use PushMeBaby sample to send Apple Push Notifications?

查看:422
本文介绍了如何使用PushMeBaby样品送苹果推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用PushMeBaby样本APN服务器应用程序发送推送通知到我的设备。我即席发布应用。对于我的应用程序ID我已经创建了研发和生产都SSL证书。这似乎是没有从PushMeBaby应用程序发送推送通知,我已经安装了alread推SSL证书的工具链..它仍然似乎不工作。

I am trying to use PushMeBaby sample APN Server application to send push notifications to my device. I have adhoc distribution application. For my application ID I have created both ssl certificates for development and production. It seems to be not sending push notifications from PushMeBaby application, I have alread installed Push SSL certificates to the tool chain.. still it seems to be not working..

2010-02-01 07:20:49.578 PushMeBaby[7193:a0f] MakeServerConnection(): 0
2010-02-01 07:20:49.613 PushMeBaby[7193:a0f] SSLNewContext(): 0
2010-02-01 07:20:49.614 PushMeBaby[7193:a0f] SSLSetIOFuncs(): 0
2010-02-01 07:20:49.614 PushMeBaby[7193:a0f] SSLSetConnection(): 0
2010-02-01 07:20:49.615 PushMeBaby[7193:a0f] SSLSetPeerDomainName(): 0
2010-02-01 07:20:49.631 PushMeBaby[7193:a0f] SecKeychainOpen(): 0
2010-02-01 07:20:49.648 PushMeBaby[7193:a0f] SecCertificateCreateFromData(): 0
2010-02-01 07:20:49.655 PushMeBaby[7193:a0f] SecIdentityCreateWithCertificate(): 0
2010-02-01 07:20:49.656 PushMeBaby[7193:a0f] SSLSetCertificate(): 0
2010-02-01 07:20:52.353 PushMeBaby[7193:a0f] SSLHandshake(): 0
2010-02-01 07:20:57.954 PushMeBaby[7193:a0f] SSLWrite(): 0 144

以上是PusheBaby X code应用程序的日志。

Above is the log of PusheBaby xcode application.

推荐答案

确定 - 想通了这一点。

OK - Figured this out.

该设备的令牌,我传递(这是我从UrbanAirship了)没有空格。我使用的设备令牌从每有字符串中的每个字符8之间的空格这个伟大的教程(http://mobiforge.com/developing/story/programming-apple-push-notification-services)的iPhone应用程序控制台。这奏效了。

The device token I was passing in (which I got from UrbanAirship) had no spaces. I used the device token from the console from the iPhone app per this great tutorial (http://mobiforge.com/developing/story/programming-apple-push-notification-services) which has spaces between every 8 chars in the string. That did the trick.

该设备令牌应该是这样的 - 38c866dd bb323b39 ffa73487 5e157ee5 a85e0b7c e90d56e9 fe145bcc 6c2c594b

The device token should look like this - 38c866dd bb323b39 ffa73487 5e157ee5 a85e0b7c e90d56e9 fe145bcc 6c2c594b

之后 - 当你在看的NSLog从PushMeBaby - 你会看到处理的SSLWrite呼吁增加1计数(我从104到105了)
例如2011-04-28 11:21:41.543 PushMeBaby [49218:903] SSLWrite():0 105

Later - when you look at the NSLog from PushMeBaby - you will see the "processed" count in the SSLWrite call increased by 1 (mine went from 104 to 105) e.g. 2011-04-28 11:21:41.543 PushMeBaby[49218:903] SSLWrite(): 0 105

希望这有助于别人谁挣扎像我好几天了...

Hope this helps somebody else who struggled like me for days...

这篇关于如何使用PushMeBaby样品送苹果推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆