danhper / pushex

Push notifications for Elixir
https://hexdocs.pm/pushex
MIT License
104 stars 7 forks source link

I'm not able to create Apple certificates. Can someone help me with a guide or reference #5

Closed yepesasecas closed 7 years ago

yepesasecas commented 7 years ago

Im trying to create the Apple certificate, but I'm not able to make it work. I follow multiple tutorial from different languages, but they don't work. pushex.

thank you

danhper commented 7 years ago

Hi, What part of the certification are you blocked at?

yepesasecas commented 7 years ago

I have been following multiple guides. This are the steps I took (I think, I'm doing it totally wrong)

  1. I created an Apple Push Notification service SSL (Sandbox & Production)

    screen shot 2017-05-23 at 9 28 07 am
  2. Then I added to my Keychain.

  3. I found this guide:

    screen shot 2017-05-23 at 9 31 48 am
  4. Then tried to export as .p12, not allowed.

    screen shot 2017-05-23 at 9 32 55 am
danhper commented 7 years ago

This looks perfectly fine, but you do not need the last step. Once you have cert.pem and key_unencrypted.pem, you only need to configure your app, for example:

config :pushex,
  apns: [
    default_app: "my_app",
    apps: [
      [name: "my_app",
       env: :dev,
       certfile: Path.expand("../cert.pem", __DIR__),
       keyfile: Path.expand("../key_unencrypted.pem", __DIR__),
       pool_size: 5]
    ]
  ]

With the above config, cert.pem and key_unencrypted.pem should be placed in your project root directory. Of course you can change this to fit your needs.

yepesasecas commented 7 years ago

thank you for your help. @tuvistavie :)

also this helped me: https://stackoverflow.com/questions/21250510/generate-pem-file-used-to-setup-apple-push-notification