CometChat Push Notification Sample App (built using CometChat Pro SDK) is a fully functional push notification app capable of one-on-one (private) and group messaging as well as Calling. This sample app enables users to send and receive push notifications for text and multimedia messages like images, videos, documents as well as ** Custom Messages** . Also, users can make push notifications for Audio and Video calls to other users or groups.
-
Simply clone the project from ios-swift-push-notification-app repository.
-
After cloning the repository navigate & Select your push notification configuration. i.e Firebase or APNS + Callkit (Recomended).
-
Use below command to install required pods.
$ pod install
-
Create certificates for your bundle ID as per mentioned in our documentation.
-
Build and run the Sample App.
To Run to sample App you have to do the following changes by Adding APP_ID, API_KEYand REGION CODE and s user's UID for which you wants to send the push notification.
You can obtain your APP_ID and API_KEY from CometChat-Pro Dashboard
- Enable to Push notification Extension from [CometChat-Pro 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 wants to send the push notification.
- Add CometChat SDK.
We recommend using CocoaPods, as they are the most advanced way of managing iOS project dependencies. Open a terminal window, move to your project directory, and then update the SDK by running the following command.
$ pod install
If the pod installation fails due to Cocoapods dependancy issue then use the below command to install the framework through cocoapods.
pod install --repo-update
-
We are providing two ways to implement push notification for your app.
Please refer our documentation to intergrate push notification inside your app.
- Ignore firebase setup if you're using APNS based approach.
- Please add Callkit related code carefully to avoid issues.
Learn more about how to Increment Badge Count using Notification service Extension.
Learn more about how to hide push notification for blocked users using Notification service Extension.
-
To read the full dcoumentation on UI Kit integration visit our Documentation .
-
Facing any issues while integrating or installing the UI Kit please connect with us via real time support present in CometChat Dashboard.
Thanks to the following people who have contributed to this project:
@pushpsenairekar2911 👨💻
@jeetkapadia 👨💻
Contact us via real time support present in CometChat Dashboard.
This project uses the following license.