Production和development用的push的服务器不同
p
dev是:$apnsHost = 'gateway.sandbox.push.apple.com';
pro是:$apnsHost = 'gateway.push.apple.com';
在测试程序pushmebaby中:
dev是:
result = MakeServerConnection("gateway.sandbox.push.apple.com", 2195, &socket, &peer);
result = SSLSetPeerDomainName(context, "gateway.sandbox.push.apple.com", 30);
pro是:
result = MakeServerConnection("gateway.push.apple.com", 2195, &socket, &peer);
result = SSLSetPeerDomainName(context, "gateway.push.apple.com",22);