Push templates setup - iOS

Learn how to install the AEPNotificationContent package by following the instructions below.

Prerequisites

Make sure you have created a notification extension and configured your app to use Adobe Campaign Classic.

Install using CocoaPods

# Podfile
use_frameworks!

# for app development, include all the following pods
target 'YOUR_NOTIFICATION_CONTENT_EXTENSION_NAME' do
      pod 'AEPNotificationContent'
end

Replace YOUR_NOTIFICATION_CONTENT_EXTENSION_NAME and then, in the Podfile directory, run:

$ pod install

Install using Swift Package Manager

To add the AEPNotificationContent Package to your application, from the Xcode menu select:

File > Add Packages...

data-variant=info
data-slots=text
The menu options may vary depending on the version of Xcode being used.

Enter the URL for the AEP Notification Content repository: https://github.com/adobe/aepsdk-notificationcontent-ios.git.

For Dependency Rule, select Up to Next Major Version.

Alternatively, if your project has a Package.swift file, you can add the AEPNotificationContent extension directly to your dependencies:

dependencies: [
    .package(name: "AEPNotificationContent", url: "https://github.com/adobe/aepsdk-notificationcontent-ios.git", .upToNextMajor(from: "5.0.0"))
],
targets: [
    .target(
        name: "YourNotificationContentExtensionTarget",
        dependencies: [
            .product(name: "AEPNotificationContent", package: "AEPNotificationContent")
        ]
    )
]

Install using binaries

To generate AEPNotificationContent.xcframework, run the following command from the root directory:

make archive

This will generate an XCFramework under the build folder. Drag and drop AEPNotificationContent.xcframework to your app's Notification Content extension target.

Configure your Notification Content extension

With the AEPNotificationContent package now available in your application, you need to configure your notification content extension to use it.