App Clips

Set up App Clips with Airship to enable push notifications for lightweight app experiences.

App Clips are lightweight versions of your app that users can access quickly without installing the full app. They’re designed for specific, focused tasks and can be launched via QR codes, NFC tags, links, or App Clip codes.

App Clips support push notifications, specifically for transactional use cases. When a user downloads an App Clip, they’re automatically opted-in to notifications for 8 hours. After this period, you can ask users to extend notification permissions for up to 1 week.

Prerequisites

 Important

An App Clip requires a separate application identifier in the Apple Developer Portal and a separate project in the Airship dashboard. You need to follow the same setup steps required for the main application in both the Apple Developer Portal and the Airship dashboard.

Register an App Clip Identifier

To create a push certificate for your App Clip, you need to register a new application identifier:

  1. In the Certificates, Identifiers & Profiles section of your Apple Developer account, click Identifiers.
  2. Click the + button to register a new identifier.
  3. Select App Clips as the identifier type.
  1. Specify the app ID of the parent app and the product name:
  1. Complete the registration process.

Create an App Clip Target

  1. In Xcode, click FileNewTarget….
  2. Select App Clip in the Application section.
  1. Configure your App Clip target and click Finish.

  2. Important: Add the Push Notifications capability to your App Clip target:

    • Select your App Clip target
    • Go to Signing & Capabilities
    • Click + Capability and add Push Notifications

Configure Ephemeral Notifications

By default, App Clips can receive notifications for 8 hours after installation. To enable ephemeral notifications, add the following to your App Clip’s Info.plist:

Enable Extended Push Notification Permissions

To send push notifications for an extended period (up to 1 week), enable extended push notification permissions:

Enable extended push notifications

Airship.push.extendedPushNotificationPermissionEnabled = true
UAirship.push.extendedPushNotificationPermissionEnabled = YES;

Initialize Airship in Your App Clip

Initialize the Airship SDK in your App Clip the same way you would in your main app. See the Getting Started guide for initialization instructions.

Sending Notifications to App Clips

When sending push notifications to App Clips, include the target_content_id in the iOS override object. This identifies the specific App Clip experience:

{
   "notification": {
      "ios": {
         "target_content_id": "https://example.com/restaurants/cafe_portland/order/1234",
         "alert": {
            "title": "Order Status",
            "subtitle": "Cafe Portland",
            "body": "Your order is ready!"
         }
      }
   }
}

For more details on the iOS override object, see the API reference.