> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifly.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Rich push notifications

> Set up a Notification Service Extension, App Groups, and the Notifly SDK to display and test rich push notifications on iOS.

> [tab] iOS
>
> Rich push notifications display media, such as images and videos, and collect push delivery metrics.
> This feature is available only on iOS. Flutter and React Native apps need the same configuration for their iOS targets.
>
> > [!NOTE]
> >
> > SDK version requirements
> >
> > * iOS SDK: 1.3.0 or later
> > * React Native: 3.0.4 or later
> > * Flutter: 1.2.3 or later
>
> ## 1. Set up a Notification Service Extension
>
> 1. Open the project in Xcode. For Flutter or React Native projects, select the `.xcworkspace` file in the `ios` folder.
>
>    ![Open the project in Xcode](https://mintcdn.com/notifly/QWigoXWbDguqzkH4/ko/developer-guide/image/ios_push_extension_open_project_navigator.png?fit=max\&auto=format\&n=QWigoXWbDguqzkH4\&q=85\&s=f7d64b51b5a3189c21d29157d7ebde7f)
>
> 2. Select the project in Project Navigator, then click the **+** button to add a **Notification Service Extension**.
>
>    ![Add a Notification Service Extension target](https://mintcdn.com/notifly/QWigoXWbDguqzkH4/ko/developer-guide/image/ios_push_extension_create_extension_target.png?fit=max\&auto=format\&n=QWigoXWbDguqzkH4\&q=85\&s=566572364266614aa62fd21b1ad96fcd)
>
> 3. Set **Product Name** to `NotiflyNotificationExtension`, then click **Finish**.
>
>    ![Name the Notification Service Extension](https://mintcdn.com/notifly/QWigoXWbDguqzkH4/ko/developer-guide/image/ios_generate_push_extension.png?fit=max\&auto=format\&n=QWigoXWbDguqzkH4\&q=85\&s=3847ad7846dc9afab990338371c53c22)
>
> Check that the extension's version matches the main app's version. Set the extension's minimum deployment target to the version required by the selected SDK. The current Notifly iOS SDK requires iOS 15.0 or later.
>
> ![Match the extension version to the app version](https://mintcdn.com/notifly/QWigoXWbDguqzkH4/ko/developer-guide/image/ios_push_extension_version.png?fit=max\&auto=format\&n=QWigoXWbDguqzkH4\&q=85\&s=1b26e07b5fddc9ca3c2bf3ec3ff9cf36)
>
> ## 2. Configure App Groups
>
> 1. Use `group.notifly.{username}` as the group ID. Find `username` in the SDK credentials in the Notifly console.
>
> 2. Add **App Groups** in the **Signing & Capabilities** tab for both the main app target and the extension target. Set the same group name, `group.notifly.{username}`, for both targets.
>
>    ![Configure the App Group for the main app and extension](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/ios/ios-push-extension-app-group1.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=a32c02a390c48642394d43593bd7585f)
>
> ## 3. Add the SDK
>
> > [tab] CocoaPods
> >
> > Install the Notifly SDK as a static library in the extension target.
> >
> > ```swift theme={null}
> > target 'NotiflyNotificationExtension' do
> >   use_frameworks! :linkage => :static
> >   pod 'notifly_sdk_push_extension'
> > end
> > ```
>
> > [tab] Swift Package Manager
> >
> > Confirm that the SDK package you selected exposes `notifly_sdk_push_extension` as a library product for the extension target. If the product is unavailable, use the CocoaPods instructions above.
> >
> > 1. Open the project in Xcode and select the `NotiflyNotificationExtension` target under **TARGETS**.
> >
> > 2. Under **General > Frameworks, Libraries, and Embedded Content**, add `notifly_sdk_push_extension` if the package provides it.
>
> ## 4. Add the extension code
>
> Add the following code to `NotiflyNotificationExtension/NotificationService.swift`.
>
> > [!NOTE]
> >
> > In the Notifly console, open **Settings > Product & Project**. Find `PROJECT_ID` under **Project Info** and `USERNAME` under **SDK Auth Info**.
>
> > [tab] No existing extension
> >
> > ```swift theme={null}
> > import notifly_sdk_push_extension
> >
> > class NotificationService: NotiflyNotificationServiceExtension {
> >     override init() {
> >         super.init()
> >         self.register(projectId: "{YOUR_PROJECT_ID}", username: "{YOUR_USERNAME}")
> >     }
> > }
> >
> > ```
>
> > [tab] Existing extension
> >
> > ```swift theme={null}
> > import UserNotifications
> > import notifly_sdk_push_extension
> >
> > class NotificationService: NotiflyNotificationServiceExtension {
> >     override init() {
> >         super.init()
> >         self.register(projectId: "{YOUR_PROJECT_ID}", username: "{YOUR_USERNAME}")
> >     }
> >
> >     override func didReceive(_ request: UNNotificationRequest,
> >                              withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
> >         super.didReceive(request, withContentHandler: contentHandler)
> >         /* Add your existing code here. */
> >     }
> >
> >     override func serviceExtensionTimeWillExpire() {
> >         super.serviceExtensionTimeWillExpire()
> >         /* Add your existing code here. */
> >     }
> > }
> >
> > ```
>
> ## 5. Test the integration
>
> Follow the steps in [Test your integration](https://docs.notifly.tech/en/integration-test.md).
>
> 1. Test a push notification with an image.
>
>    Send a push notification with an image and confirm that the image appears on the device.
>
> 2. Check the device receipt event.
>
>    Send a test push notification and open the user's profile in the Notifly console. Check the message history for **기기 푸시 수신 성공**, the event that records receipt on the device.
>
>    ![Successful push receipt in the user profile](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/developer-guide/ios/ios-push-delivered.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=417628d1de3174328c495e03532e3c83)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.