-1

I need a procedure for push notification in objective-c.

step by step

Where to write code notification request and ask for the key ?

I have already tried it but stuck at some point and don't know how to solve

I have tried this in terminator:

openssl pkcs12 -clcerts -nokeys -out cert.pen-in cert.p12

openssl pkcs12 -nocerts -out key.pen -in key.p12

Openssl rsa  -in key.pem  -out key.unencrypted.pem

Cat cert.pem  key.pem >ck.pem
Keren Caelen
  • 1,466
  • 3
  • 17
  • 38
sumi
  • 3
  • 4
  • 1
    Please go through this tutorial: https://www.raywenderlich.com/156966/push-notifications-tutorial-getting-started – Harshal Wani May 07 '18 at 07:57
  • possible duplicate of https://stackoverflow.com/questions/21250510/generate-pem-file-used-to-setup-apple-push-notification?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Mitesh Dobareeya May 07 '18 at 10:10

3 Answers3

0

Follow below 3 commands step-by-step in terminal

In First, give your .cer file as input

1) openssl x509 -in aps.cer -inform der -out PushChatCert.pem

In Second, give your .p12 file and input password 4-5 times

2) openssl pkcs12 -nocerts -out PushChatKey.pem -in Certificates.p12

In Third, generate your .pem file and give to the server side.

3) cat PushChatCert.pem PushChatKey.pem > ckBRIDriver.pem

Nirav Kotecha
  • 2,493
  • 1
  • 12
  • 26
0

No need to follow this long steps. Just execute this one line in terminal.

openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts

pushcert.p12 <= This should be your APNS dev/prod .p12

Reference from

Mitesh Dobareeya
  • 970
  • 1
  • 11
  • 36
0

I suggest, try with Google firebase, they provide excellent documentation for end to end workflow. You can also test your App with the help of Google console.

Steps are:

  1. Integrate Firebase SDK
  2. Generate development certificates from Apple developer account.
  3. Upload your certificates and enter your App bundle ID.
  4. Send a sample message from google console

Reference Firebase: https://firebase.google.com/docs/ios/setup

p12 Certificates: https://docs.telerik.com/platform/appbuilder/cordova/code-signing-your-app/configuring-code-signing-for-ios-apps/create-distribution-certificate

Vinod Radhakrishnan
  • 441
  • 1
  • 6
  • 18