Skip to content

cometchat/cometchat-push-notification-app-ios

Repository files navigation

CometChat

iOS Push Notification Sample App

CometChat Push Notification Sample App is a fully functional push notification app capable of one-on-one (private) and group messaging, and Calling. This sample app enables users to send and receive push notifications for text and multimedia messages like images, videos, documents and Custom Messages. Also, users can make push notifications for Audio and Video calls to other users or groups.


Installation

  1. Clone the repository.
      git clone https://github.com/cometchat/cometchat-push-notification-app-ios.git
  1. Open the project in Xcode and navigate to select your push notification configuration:
    • APNS + Callkit (Recommended)
    • Firebase
  2. Install the pods.
   $ pod install
  1. Create certificates for your bundle ID as mentioned in our documentation.
  2. Build and run the Sample App.

Running the sample app

To Run the sample App make the following changes by Adding APP_ID, API_KEYand REGION and the user's UID for which you want to send the push notification.

You can obtain your APP_ID and API_KEY from CometChat Dashboard

  • Enable to Push notification Extension from CometChat Dashboard. To Enable Push notification extension, please navigate to Extensions --> Push Notification --> Add Extension.

  • Add Title and Firebase Server Key received from Firebase Console.

  • Open the project in Xcode.

  • Go to CometChatPro-PushNotification-SampleApp --> Constants.swift.

  • Modify apiKey and appID with your own apiKey and appID.

  • Enter toUserUID for which you want to send the push notification.


Add Push Notification inside your project

CometChat provides two ways to implement push notifications for your app.

  1. Firebase
  2. APNS (Supports Callkit)

Help and Support

For issues running the project or integrating with our UI Kits, consult our documentation or create a support ticket or seek real-time support via the CometChat Dashboard.