Chinaunix首页 | 论坛 | 博客
  • 博客访问: 120407
  • 博文数量: 95
  • 博客积分: 316
  • 博客等级: 二等列兵
  • 技术积分: 635
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-23 17:41
文章分类

全部博文(95)

文章存档

2014年(1)

2013年(1)

2012年(93)

我的朋友

分类: 嵌入式

2012-02-13 10:44:48

原文转载自:
http://blog.toshsoft.de/index.php?/archives/3-Sending-Apple-Push-Notifications-APN-in-C-Updated-Using-CA-Cert.html


Comments
Display comments as (Linear | Threaded)

A great example for apple's push service.

You should make examples for the developers.

Great code ... great documentation !!!

Great work !!!!

#1  on 2011-04-29 11:31 (Reply)

When you call SSL_connect, you check that the result is not -1. Isn't 0 an error too, per the SSL documentation?

I am getting a zero return from the SSL_connect call.

Thanks for the great tutorial,

Sanjay

#1.1  on 2011-11-17 21:29 (Reply)

Hi

Yes, that is true, thanks for pointing it out.

The problem with this example implementation is, that the error handling as such is nearly non-existent anyway. I changed the check to (err <= 0) for now, and if I find the time I will update it with the correct error handling and the returned errors you get through SSL_get_error().

Best regards

#1.1.1  on 2011-11-17 22:23 (Reply)

Brilliant. Haven't got it going yet, but this is the *_only_* non-PHP code for doing this I've found. Apple's partial example was way too partial.

I'm planning to port it to objective-c and wrap it in a class if I can.

Thanks heaps.

#2  () on 2011-06-28 15:57 (Reply)
Always a good job right here. Keep rolling on through.
#2.1  () on 2011-09-06 18:32 (Reply)

It works! A little polishing yet, and then I'm done!

Thanks so much. Once I'm done, I'll blog it and link back to here.

Peter

#3  () on 2011-07-01 17:52 (Reply)

Hi Its really Great work .

#4  on 2011-12-07 13:26 (Reply)

Hi,

I reuse your code to to make an engine that works with beanstalkd queue engine. It's currently draft, but will hopefully be nice later.. See pushMessageEngine on github. Thanks for your original contribution that helped a lot.

Seb

#5  () on 2011-12-10 12:21 (Reply)

I am now trying this demo. it seems easy to use.

Thank you very much!

Great Job!

#6 tiara on 2011-12-23 11:06 (Reply)

in RemoteNotification.c

60 strcat(messageBuff, "\"},");

61 //strcat(messageBuff, "\"}");

Building, but did not send. Are the above changes could send.

#7  on 2012-01-22 05:04 (Reply)

Hi

it seems Apple changed how they handle the received JSON and that broke the old implementation. I have no PC right now, but I will update the post and source code first thing in the morning.

Thanks for the hint and best regards

Oliver

#7.1  on 2012-01-22 05:46 (Reply)

Sorry, I forgot to say.

Thanks for providing the source code.

#7.1.1  on 2012-01-22 06:22 (Reply)

阅读(2033) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~