NotifKit Setup
Generate a .p8 Auth Key for APNS
In order to setup OneSignal (the Framework that NotifKit is built on), we first need to generate a .p8 Auth Key.
Go to the Keys Section (opens in a new tab) of your Apple Developer Account and press on the + Button
If you have created added a Key to use with AuthKit beforehand, you don't have to create a new one, just press Edit on the one you've already created.
Enter a Key Name, select Apple Push Notifications Service (APNs) and press Continue. Press Register to create the Key.
Next:
- Download the .p8 Key
- Write down your Developer Team ID
- Write down your Key ID
Create a OneSignal Project
If you haven't already, create a OneSignal Account (opens in a new tab).
In the OneSignal Dashboard (opens in a new tab), click New App/Website.
On the App Creation Screen:
- Enter your App Name
- Enter your Organization Name
- Select Apple iOS (APNs)
- Press Next
On the OneSignal APNs Configuration Screen:
- Upload the .p8 Key
- Enter the Key ID
- Enter the Developer Team ID
- Enter your App Bundle ID: com.ORGANIZATION.APPNAME that you've used during Project Initialization.
- Press Save & Continue
Next:
- Select Native iOS
- Press Save & Continue
- Copy the OneSignal App ID
- Press Done
Save the App ID in your App
Back in Xcode, go to Targets > NotifKit > Config > OneSignal-Info and paste the App ID into the value property of the key ONESIGNAL_APP_ID.
Test a Test Push Notification
It's recommended to wait until you have set up the rest of your app before doing any tests, but if you can't wait, you can temporarily disable other frameworks, and Send a Test Notification