SDK Installation
iOS Native

Push Notification for iOS

6min

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

Add Capability to App

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 fetchRemote 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

Document image


Configure App

Now you have to update AppDelegate to let CooeeSDK know about notification actionforeground mode and deviceToken.

ObjectiveC
Swift


Notification Service Extension

Now you have to add Notification Service Extension to your app

  1. Once you add Notification Service Extension in the app then add the following capability in your extension
    • Push Notification
    • App Group
  2. App Group to make communication between your app and extension.
  3. App Group add/enable group with the name group.com.letscooee.YOUR_APP_ID
  4. 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

Document image


Code Update

To access CooeeSDK in your Notification Service Extension you have to update your Podfile as below

Ruby


Update didReceive method in NotificationService with the below code

ObjectiveC
Swift


That's it!! You are done with push notification integration. Now start testing your integration with Cooee Dashboard

Updated 25 Mar 2024
Did this page help you?