MYSTERY ZILLION တွင် English သို့မဟုတ် Unicode ဖြင့်သာ အသုံးပြုခွင့်ရှိသည်။ ဇော်ဂျီ ၊ ဧရာ စသည်တို့ကို အသုံးပြုခွင့် မရှိ။ Unicode Guide ကို ဒီမှာ Download ချပါ။ Zawgyi to Unicode Converter
Don't share ebook or software if nobody request. You can find free book websites on here. We are welcome for discussion or asking question instead.
Chat App by Apple Push Notification Services (Server Side by php )
  • Vote Up0Vote Down KhantThuKhantThu
    Posts: 79Registered Users
    Hello everyone,

    I would like to do chat app by APNS (is it good to do?). I have done about this tutorial where I can receive message from application on mac.
    http://mobiforge.com/developing/story/programming-apple-push-notification-services

    I cannot find simple tutorial for server side. I don't want to use API eg. from http://urbanairship.com/ . I would like to create and test my own one.

    Can anyone please help me ? I am now also stuck at this tutorial which also show php tutorial for server. http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
    It is because it need to convert certificate to PEM file.

    I want to know how to write for server side.
    With Regards,
  • 9 မှတ်ချက်များ sorted by
  • Vote Up1Vote Down KhantThuKhantThu
    Posts: 79Registered Users
    Ohhh...I found out where it is. The PEM pass phrase is not matched. Now, I can use apns. Thanks bro. :)
  • Vote Up0Vote Down saturngodsaturngod
    Posts: 4,599Administrators Accepted Answer
  • Vote Up0Vote Down KhantThuKhantThu
    Posts: 79Registered Users
    Thanks bro. I have encountered same problem as other people. I try to follow steps for creating PEM. But, I still got this error. :(


    Warning: stream_socket_client() [function.stream-socket-client]: Unable to set private key file `/Applications/XAMPP/xamppfiles/htdocs/SimplePush/ck.pem' in /Applications/XAMPP/xamppfiles/htdocs/SimplePush/simplepush.php on line 22

    Warning: stream_socket_client() [function.stream-socket-client]: failed to create an SSL handle in /Applications/XAMPP/xamppfiles/htdocs/SimplePush/simplepush.php on line 22

    Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable crypto in /Applications/XAMPP/xamppfiles/htdocs/SimplePush/simplepush.php on line 22

    Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /Applications/XAMPP/xamppfiles/htdocs/SimplePush/simplepush.php on line 22
    Failed to connect: 0
  • Vote Up0Vote Down saturngodsaturngod
    Posts: 4,599Administrators Accepted Answer
    Are both the certificate and private key in that one .pem file?
    Did you remove password key in pem ?
    Are you sure XAMPP have a permission to read pem file?
    Can access telnet server ?

    telnet gateway.sandbox.push.apple.com 2195
  • Vote Up0Vote Down KhantThuKhantThu
    Posts: 79Registered Users
    1st and 2nd ..I think it will be okay.

    But how to give permission to XAMPP to read pem file bro?

    I think it can access to telnet server. It response.
    $ openssl s_client -connect gateway.sandbox.push.apple.com:2195
    -cert PushChatCert.pem -key PushChatKey.pem
  • Vote Up0Vote Down saturngodsaturngod
    Posts: 4,599Administrators
    for development, give your pem to 777 permission and test it.

    $ sudo chmod 777 /Applications/XAMPP/xamppfiles/htdocs/SimplePush/ck.pem
  • Vote Up0Vote Down KhantThuKhantThu
    Posts: 79Registered Users
    I still have same errors. When I follow this,
    http://code.google.com/p/apns-php/wiki/CertificateCreation
    I don't understand this.How can I select Apple Development Push Services? I see private key and can only export as 1 element.

    Expand Apple Development Push Services and select Apple Development Push Services AND your private key (just under Apple Development Push Services)
    Right-click and choose "Export 2 elements..." and save as server_certificates_bundle_sandbox.p12 (don't type a password).

    I also making pem from this tutorial. But same error.
    http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12

    Is it possible to check whether 1st and 2nd is correct? bro
  • Vote Up0Vote Down saturngodsaturngod
    Posts: 4,599Administrators Accepted Answer
    can you try with pushmebabay.app from http://mobiforge.com/developing/story/programming-apple-push-notification-services ?

    The problem may your export PEM keys may not include Private Key.

    Can you show me the screen shot of how you export pem key ?


    Go to your Keychain Access .

    Select your apple push notification certificate , can you see the down arrow ?

    Your Certificate name must be Apple Development iOS Push Services: yourapp.id

    image

    If you see down arrow , press it.

    Both select your certficate and private key . Right Click , export 2 items.

  • Vote Up0Vote Down KhantThuKhantThu
    Posts: 79Registered Users
    Thanks bro. From mobiforge, I have done that tutorial (pushmebaby). That one don't need pem file. But it is not by php.

    I export PEM key as follow.


    Image and video hosting by TinyPic

    For 4 error, it is due to private key missing. I didn't type carefully for passphrase when creating PEM file. Now I can use apns :)


ဆွေးနွေးမေးမြန်းခြင်းစတင်ရန်

မင်္ဂလာပါ!

လှိုက်လှဲစွာကြိုဆိုပါသည်။ ယခု ပထမဆုံးအကြိမ် ရောက်ဖူးခြင်းဖြစ်ပါသလား? ဝင်ရောက် ဆွေးနွေး မေးမြန်းလိုပါလျှင် အောက်တွင်ဖော်ပြထားသော button များမှတဆင့် ဝင်ရောက် ဆွေးနွေးနိုင်သကဲ့သို့ အဖွဲ့ဝင်အသစ်အနေဖြင့်လည်း လျှောက်ထားနိုင်ပါတယ်။

Facebook ဖြင့်ဝင်ရန် Google ဖြင့်ဝင်ရောက်ရန် OpenID ဖြင့်ဝင်ရောက်ရန် Twitter ဖြင့်ဝင်ရောက်ရန်

အမျိုးအစားများ

In this Discussion

Tagged