Push Notification for iOS
Cooee delivers engagement content with Push Notification. Hence, Push Notification plays the main role with CooeeSDK. iOS needs to be set up with APNS
Follow the below steps for Push Notification setup
To get started with push notifications you will need to add the following capability to your app
- Push Notification
- Background Modes
- App Group
Then you have to update Background Mode and App Group
- Make sure to enable Background fetch, Remote notification & Background processing in Background Mode.
- In the App Group add a group with the name group.com.letscooee.YOUR_APP_ID
Your capability window should look like below
Now you have to update AppDelegate to let CooeeSDK know about notification action, foreground mode and deviceToken.
Now you have to add Notification Service Extension to your app
- Once you add Notification Service Extension in the app then add the following capability in your extension
- Push Notification
- App Group
- App Group to make communication between your app and extension.
- App Group add/enable group with the name group.com.letscooee.YOUR_APP_ID
- COOEE_APP_ID in Info.plist of your Notification Service Extension
Once you're done with the above steps; Your extension capability window should look like below
To access CooeeSDK in your Notification Service Extension you have to update your Podfile as below
Update didReceive method in NotificationService with the below code
That's it!! You are done with push notification integration. Now start testing your integration with Cooee Dashboard