'2011/05'에 해당되는 글 1건

  1. iPhone push 테스트 2011/05/13

iPhone push 테스트

Posted at 2011/05/13 18:41// Posted in mobile

http://code.google.com/p/apns-python-wrapper/

pem 만들기

openssl pkcs12 -clcerts -nokeys -out cert.pem -in cert.p12
openssl pkcs12 -nocerts -out key.pem -in key.p12

# passphase 제거
openssl rsa -in key.pem -out key.unencrypted.pem

# pem 합치기
cat cert.pem key.unencrypted.pem > ck.pem




deviceToken = "~~~"

import binascii
deviceToken = binascii.unhexlify(deviceToken)
print deviceToken

from APNSWrapper import *

wrapper = APNSNotificationWrapper('ck.pem', True)

message = APNSNotification()
message.token(deviceToken)
message.alert("!!")

wrapper.append(message)
wrapper.notify()
이올린에 북마크하기
2011/05/13 18:41 2011/05/13 18:41