# App Clips

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

[App Clips](https://developer.apple.com/documentation/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](https://www.airship.com/docs/guides/getting-started/developers/configure-channels/#ios-channel-configuration).


## 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.

![App Clips](https://www.airship.com/docs/images/app-clip-identifier_hu_c7c5b6bc665a4d40.webp)

4. Specify the app ID of the parent app and the product name:

![App Clips](https://www.airship.com/docs/images/app-clip-identifier2_hu_dd057b939ae88cc1.webp)

5. Complete the registration process.

## Create an App Clip Target

1. In Xcode, click **File** → **New** → **Target...**.
2. Select **App Clip** in the **Application** section.

![App Clips](https://www.airship.com/docs/images/app-clip-target_hu_87e2d0a265a4c2c3.webp)

3. Configure your App Clip target and click **Finish**.

4. **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`:

![App Clips](https://www.airship.com/docs/images/app-clip-plist_hu_ad54638ec83033df.webp)

## Enable Extended Push Notification Permissions

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


#### Swift


```swift
Airship.push.extendedPushNotificationPermissionEnabled = true
```



#### Objective-C


```objc
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](https://www.airship.com/docs/developer/sdk-integration/apple/installation/getting-started/) 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:

```json
{
   "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](https://www.airship.com/docs/developer/rest-api/ua/schemas/platform-overrides/#iosoverrideobject).

## Related Documentation

- [Getting Started with Push Notifications](https://www.airship.com/docs/developer/sdk-integration/apple/push-notifications/getting-started/)
- [Installing the Airship SDK](https://www.airship.com/docs/developer/sdk-integration/apple/installation/getting-started/)
- [iOS Channel Configuration](https://www.airship.com/docs/guides/getting-started/developers/configure-channels/#ios-channel-configuration)

