https://github.com/stefanhafeneger/PushMeBaby
替换这句 #include <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h> 为 #include <MacTypes.h>
2.把你的开发证书.cer 文件更改名为apns.cer,放入工程中,代码中是通过
self.certificate = [[NSBundle mainBundle] pathForResource:@"apns1" ofType:@"cer”];取你的证书文件的
3.在输入框中粘贴进去你的deviceToken,注意不要带<>,空格可以有
4.可以开心的测试了~
//////////////////////////
|
还有result = SSLSetPeerDomainName(context, "gateway.push.apple.com", 30);
应该改成 result = SSLSetPeerDomainName(context, "gateway.push.apple.com", 22); 22指的是前面字符串的length