Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Latest commit

 

History

History
45 lines (31 loc) · 1.53 KB

ONE_SIGNAL.md

File metadata and controls

45 lines (31 loc) · 1.53 KB

One Signal Set Up

This will explain how to use One Signal to set up push notifications

iOS

First, you will need to create a certificate from Apple for iOS. Click on your app in the identifiers list in the Apple Developer Portal and then scroll down to configure a push certificate.

push certificate

You will need to generate a Certificate Signing Request for Apple, use the following command

openssl genrsa -out myprivate.key 2048
openssl req -new -key myprivate.key -out csr.certSigningRequest

Fill Prompts with this info:

Country Name (2 letter code) [AU]: US
State or Province Name [Some-State]: United States
Locality Name []:
Organization Name []: Apple Inc.
Organizational Unit Name []: Apple Worldwide Developer Relations
Common Name []: Apple Worldwide Developer Relations Certification Authority
Email Address []: your-email

Upload new CSR to download a .cer file from Apple, then convert to .p12, remember the password!

openssl x509 -inform DER -outform PEM -in <CERTIFICATE>.cer -out cert.pem
openssl pkcs12 -inkey myprivate.key -in cert.pem -export -out cert.p12

Now go to OneSignal and create a new app. Choose iOS as the platform first. Upload your new .p12 certificate, using the password I told you to remember.

onesignal onboarding

Use the App ID it gives you and add this key to your app .env file.

ONE_SIGNAL_KEY=<key>