# Push Notifications Comprehensive guides for implementing push notifications, including setup, rich media support, interactive notifications, badge management, quiet time, and more. # Push Notifications > How to configure your application to receive and respond to notifications. Before setting up push notifications in your app, you need to configure APNs (Apple Push Notification service) in the Airship dashboard. See [iOS Channel Configuration](https://www.airship.com/docs/guides/getting-started/developers/configure-channels/#ios-channel-configuration) for instructions on uploading your APNs certificate or token. ## Enable Capabilities Before enabling push notifications, you need to configure your app's capabilities in Xcode. ### Enable Push Notifications Capability 1. Open your project in Xcode. 2. Click on your project in the Project Navigator. 3. Select your main app target and then click the **Signing & Capabilities** tab. 4. If you do not see Push Notifications enabled, click **+ Capability** and add **Push Notifications**. ![Adding the Push Notifications capability in Xcode](https://www.airship.com/docs/images/ios-enable-push-notifications-capabilities_hu_2e1789fffb02612b.webp) *Adding the Push Notifications capability in Xcode* ### Enable Background Modes 1. Select your main app target and then click the **Signing & Capabilities** tab. 2. Click **+ Capability** and add **Background Modes**. ![Adding the Background Modes capability in Xcode](https://www.airship.com/docs/images/ios-enable-background-mode-capabilities_hu_f135d9fec0ba0d06.webp) *Adding the Background Modes capability in Xcode* 3. In the **Background Modes** section, select the **Remote notifications** checkbox. ![Enabling Remote notifications in Background Modes](https://www.airship.com/docs/images/ios-background-mode-remote-notifications_hu_7e38b08288fcd7b2.webp) *Enabling Remote notifications in Background Modes* ## Add Rich Media Support To support rich media attachments (images, animated GIFs, video) in push notifications, you need to create a Notification Service Extension. See [Notification Service Extension](https://www.airship.com/docs/developer/sdk-integration/apple/push-notifications/notification-service-extension/) for setup instructions. ## Enable User Notifications The Airship SDK distinguishes between *user notifications* (visible to users) and *silent push notifications* (background data delivery). User notifications require explicit permission from the user. By default, user notifications are disabled. Enable them when you want to show visible notifications to users. ### Basic Enablement The simplest way to enable user notifications is to set the `userPushNotificationsEnabled` property: #### Swift ```swift Airship.push.userPushNotificationsEnabled = true ``` #### Objective-C ```objc UAirship.push.userPushNotificationsEnabled = YES; ``` ### Checking Authorization State To check whether the user granted permission, use the async method which returns the system authorization state: #### Swift ```swift let authorized = await Airship.push.enableUserPushNotifications() if authorized { // User granted permission } else { // User denied permission } ``` #### Objective-C > **Note:** This async method is not available in Objective-C. Use the basic `userPushNotificationsEnabled` property instead. > **Note:** The return value represents the **system authorization state** (whether the user granted permission), not the state of `userPushNotificationsEnabled`, which will always be set to `true` after calling this method. ### Handling Denied Permissions If the user has already denied notification permissions, you can provide a fallback action to guide them to system settings or show a custom message: #### Swift ```swift // Navigate to system settings if permission is denied let authorized = await Airship.push.enableUserPushNotifications( fallback: .systemSettings ) // Or provide a custom callback let authorized = await Airship.push.enableUserPushNotifications( fallback: .callback { // Show custom UI explaining why notifications are important // and guide user to system settings } ) // Or no fallback let authorized = await Airship.push.enableUserPushNotifications( fallback: .none ) ``` #### Objective-C > **Note:** This async method is not available in Objective-C. Use the basic `userPushNotificationsEnabled` property instead. The `PromptPermissionFallback` options are: - `.none` - No fallback action - `.systemSettings` - Automatically navigate to system settings if permission is denied - `.callback` - Execute a custom callback to handle the denied state > **Tip:** To increase the likelihood that users will accept notification permissions, avoid prompting immediately on app launch. Instead, wait for a more appropriate moment, such as after the user completes an action or views relevant content. ## Configure Notification Options Before enabling user notifications, you can configure which notification types your app will request permission for. ### Standard Notification Options By default, the Airship SDK requests permission for alerts, badges, and sounds. You can customize these options: #### Swift ```swift Airship.push.notificationOptions = [.alert, .badge, .sound] ``` #### Objective-C ```objc UAirship.push.notificationOptions = (UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert); ``` ### Provisional Authorization Provisional authorization allows you to send notifications without initially prompting the user. Notifications are delivered quietly to the Notification Center until the user explicitly chooses to keep them. #### Swift ```swift Airship.push.notificationOptions = [.alert, .badge, .sound, .provisional] ``` #### Objective-C ```objc UAirship.push.notificationOptions = (UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionProvisional); ``` > **Note:** With provisional authorization, you can programmatically enable user notifications without showing a permission prompt. This is still required for any visible notification delivery. ## Foreground Presentation Options When your app is in the foreground, iOS silences notifications by default. Configure how notifications are displayed when the app is active: #### Swift ```swift Airship.push.defaultPresentationOptions = [.alert, .badge, .sound] ``` #### Objective-C ```objc UAirship.push.defaultPresentationOptions = (UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound); ``` ## Handle Notification Events The Airship SDK provides callbacks for when notifications are received or interacted with. These callbacks are optional—the SDK will handle notifications automatically if you don't set them. #### Swift ```swift // Handle when user taps a notification Airship.push.onReceivedNotificationResponse = { response in // Handle notification response } // Handle notification received while app is in foreground Airship.push.onReceivedForegroundNotification = { userInfo in // Handle foreground notification } // Handle background content-available notification Airship.push.onReceivedBackgroundNotification = { userInfo in // Handle background notification return .noData } // Customize presentation options per notification Airship.push.onExtendPresentationOptions = { options, notification in // Return presentation options for this specific notification return [.badge, .list, .banner, .sound] } ``` #### Objective-C ```objc // Handle when user taps a notification UAirship.push.onReceivedNotificationResponse = ^(UNNotificationResponse *response) { // Handle notification response }; // Handle notification received while app is in foreground UAirship.push.onReceivedForegroundNotification = ^(NSDictionary *userInfo) { // Handle foreground notification }; // Handle background content-available notification UAirship.push.onReceivedBackgroundNotification = ^UIBackgroundFetchResult(NSDictionary *userInfo) { // Handle background notification return UIBackgroundFetchResultNoData; }; // Customize presentation options per notification UAirship.push.onExtendPresentationOptions = ^UNNotificationPresentationOptions(UNNotificationPresentationOptions options, UNNotification *notification) { // Return presentation options for this specific notification return UNNotificationPresentationOptionList | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound; }; ``` ## Silent Notifications Silent notifications are push messages that don't display a notification to the user. They're typically used to wake your app in the background to perform tasks or fetch content. To send a silent notification, set the `content_available` property to `true` in the [iOS override object](https://www.airship.com/docs/developer/rest-api/ua/schemas/platform-overrides/#iosoverrideobject). > **Important:** Thoroughly test your implementation to confirm that silent notifications don't generate any visible device notifications. > **Note:** Silent notifications (`content_available`) don't have guaranteed delivery. Factors affecting delivery include battery life, WiFi connectivity, and the number of silent pushes sent recently. These metrics are determined solely by iOS and APNs. > > Use silent notifications to supplement your app's regular behavior rather than for critical functionality. For example, use them to pre-fetch data ahead of time to reduce load times when the user launches the app. ## Next Steps - [Notification Service Extension](https://www.airship.com/docs/developer/sdk-integration/apple/push-notifications/notification-service-extension/) - Add rich media support to push notifications - [Interactive Notifications](https://www.airship.com/docs/developer/sdk-integration/apple/push-notifications/interactive-notifications/) - Add action buttons to notifications - [Badge Management](https://www.airship.com/docs/developer/sdk-integration/apple/push-notifications/badge-management/) - Set, reset, or enable auto-badge functionality - [Quiet Time](https://www.airship.com/docs/developer/sdk-integration/apple/push-notifications/quiet-time/) - Suppress notifications during specific hours - [App Clips](https://www.airship.com/docs/developer/sdk-integration/apple/push-notifications/app-clips/) - Configure push notifications for App Clips If push notifications aren't working as expected, see [Troubleshooting Push Notifications](https://www.airship.com/docs/developer/sdk-integration/apple/troubleshooting/push-notifications/) to check notification status and fix common issues. # Notification Service Extension > Create and configure a notification service extension to support rich media attachments like images, animated GIFs, and videos in push notifications. To support rich media attachments (images, animated GIFs, video) in push notifications, you need to create a [notification service extension](https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications) (NSE). ## Create a Notification Service Extension Target 1. In Xcode, click **File** → **New** → **Target...**. 2. Select **Notification Service Extension**. 3. Click **Next** and configure your extension: - **Product Name**: Your extension name (e.g., `NotificationServiceExtension`) - **Bundle Identifier**: Typically your app's bundle ID with a suffix (e.g., `com.example.app.NotificationServiceExtension`) ![Creating a Notification Service Extension target in Xcode](https://www.airship.com/docs/images/create-notification-service-extension_hu_8bb42b1a35cc5e03.webp) *Creating a Notification Service Extension target in Xcode* 4. Verify that your app target's **Embed App Extensions** includes the newly created extension. ![Verifying the extension is embedded in the app target](https://www.airship.com/docs/images/embed-extension-in-app_hu_393854a222d22be6.webp) *Verifying the extension is embedded in the app target* ## Install Dependencies #### SPM 1. Select your service extension target in the Project Navigator. 2. Go to the **Package Dependencies** tab. 3. If you haven't already added the Airship package, click **+** and add: `https://github.com/urbanairship/ios-library` 4. Select the `AirshipNotificationServiceExtension` package product for your service extension target. > **Note:** The `AirshipNotificationServiceExtension` package should only be added to the Notification Service Extension target, not the main app target. 5. Import the module: ```swift import AirshipNotificationServiceExtension ``` #### CocoaPods Add to your `Podfile`: ```ruby target "" do pod 'AirshipServiceExtension' end ``` Install: `$ pod install` #### Carthage 1. Add `AirshipNotificationServiceExtension.framework` to your service extension target following [Carthage's instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). 2. Add to your `Cartfile`: ```text github "urbanairship/ios-library" ``` 3. Build: `$ carthage update` 4. Verify that **Enable Modules** and **Link Frameworks Automatically** are enabled in Build Settings. #### xcframeworks 1. Download the latest [iOS SDK release](https://github.com/urbanairship/ios-library/releases). 2. Add `AirshipNotificationServiceExtension.xcframework` to your **main app target**: - Select your main app target - Go to **General** → **Frameworks, Libraries, and Embedded Content** - Drag in `AirshipNotificationServiceExtension.xcframework` - Set **Embed** to **Embed & Sign** 3. Add `AirshipNotificationServiceExtension.xcframework` to your **service extension target**: - Select your service extension target - Go to **General** → **Frameworks, Libraries, and Embedded Content** - Add `AirshipNotificationServiceExtension.xcframework` - Set **Embed** to **Do Not Embed** 4. Configure the service extension's runpath: - Select your service extension target - Go to **Build Settings** → search for **Runpath Search Paths** (`LD_RUNPATH_SEARCH_PATHS`) - Add: `@executable_path/../../Frameworks` 5. Verify Build Settings for both targets: - **Enable Modules**: `Yes` - **Link Frameworks Automatically**: `Yes` > **Note:** The framework must be embedded in the main app target, not the extension. Extensions cannot contain nested frameworks, which will cause App Store rejection. The runpath setting allows the extension to find the framework in the main app's `Frameworks` directory. ## Implement the Service Extension Replace the default `NotificationService` implementation with Airship's base class: #### Swift (SPM/Carthage/xcframeworks) ```swift import AirshipNotificationServiceExtension class NotificationService: UANotificationServiceExtension { } ``` #### Swift (CocoaPods) ```swift import AirshipServiceExtension class NotificationService: UANotificationServiceExtension { } ``` #### Objective-C (SPM/Carthage/xcframeworks) ```objc // NotificationService.h @import AirshipNotificationServiceExtension; @interface NotificationService : UANotificationServiceExtension @end // NotificationService.m @import Foundation; #import "NotificationService.h" @implementation NotificationService @end ``` #### Objective-C (CocoaPods) ```objc // NotificationService.h @import AirshipServiceExtension; @interface NotificationService : UANotificationServiceExtension @end // NotificationService.m @import Foundation; #import "NotificationService.h" @implementation NotificationService @end ``` That's it! The Airship base class handles downloading and attaching media from URLs in your push notifications. When you send a push notification with a media URL, the service extension will automatically download and attach the media before the notification is displayed. ## 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/) If you experience problems, see [Troubleshooting Notification Service Extensions](https://www.airship.com/docs/developer/sdk-integration/apple/troubleshooting/notification-service-extensions/) to verify setup and debug issues. # In-App Messaging > Legacy In-App Messages are banner messages delivered through push notifications that appear in-app when the user opens the application. Legacy [in-app messages](https://www.airship.com/docs/guides/messaging/messages/content/app/in-app-messages/) are delivered through push messages and automatically converted to In-App Automation (IAA) banners for display. You can customize how these messages are converted using extender blocks on the legacy in-app message manager. > **Note:** This page covers **legacy In-App Messages** delivered via push notifications. For In-App Automation (IAA) and Scenes, which are separate features with different triggers and capabilities, see [In-App Experiences](https://www.airship.com/docs/developer/sdk-integration/apple/in-app-experiences/getting-started/). For general In-App Automation styling options, see [In-App Automation](https://www.airship.com/docs/developer/sdk-integration/apple/in-app-experiences/in-app-automation/). ## Modify the schedule **Modify the schedule** ```swift InAppAutomation.shared.legacyInAppMessaging.scheduleExtender = { schedule in // Modify the schedule schedule.limit = 2 } ``` ## Modify the message **Modify the message** ```swift InAppAutomation.shared.legacyInAppMessaging.messageExtender = { message in /// Modify the message if case .banner(var bannerInfo) = message.displayContent { bannerInfo.borderRadius = 10.0 message.displayContent = .banner(bannerInfo) } } ``` # Landing Pages > Landing Pages are web pages triggered from a notification response that are automatically converted to HTML In-App Automation experiences. Landing Pages are web pages triggered as an action from a notification response. When a user taps a notification with a landing page action, the landing page is automatically converted to an HTML In-App Automation experience for display. For general In-App Automation styling options, including HTML customization, see [In-App Automation](https://www.airship.com/docs/developer/sdk-integration/apple/in-app-experiences/in-app-automation/). ## Customize Landing Pages You can customize landing pages by registering a custom action that extends the HTML schedule before display: #### Swift ```swift Airship.actionRegistry.registerEntry( names: LandingPageAction.defaultNames ) { let action = LandingPageAction() { args, schedule in guard case .inAppMessage(var message) = schedule.data else { return } guard case .html(var htmlContent) = message.displayContent else { return } // Customize the HTML content htmlContent.forceFullscreen = true message.displayContent = .html(htmlContent) schedule.data = .inAppMessage(message) } return ActionEntry(action: action) } ``` #### Objective-C > **Note:** Custom action registration with closures is not available in Objective-C. Use Swift or subclass the action directly. # Badge Management > Manage the badge number that appears on your app icon, including manual control and automatic incrementing. The badge appears as a number on your app icon. You can set, reset, or enable auto-badge functionality. ## Get Badge Value The `badgeNumber` property returns the current badge number used by both the device and the Airship server. This property must be accessed on the main thread. #### Swift ```swift let currentBadge = await Airship.push.badgeNumber ``` #### Objective-C > **Note:** This async property is not available in Objective-C. Use `UIApplication.shared.applicationIconBadgeNumber` to read the current badge value. ## Set Badge Value Set the badge number to a specific value. This updates both the device badge and the value stored on Airship servers. #### Swift ```swift try await Airship.push.setBadgeNumber(20) ``` #### Objective-C > **Note:** This async method is not available in Objective-C. Use `UIApplication.shared.applicationIconBadgeNumber` to set the badge value directly. ## Reset Badge Reset the badge to zero on both the device and Airship servers. #### Swift ```swift try await Airship.push.resetBadge() ``` #### Objective-C > **Note:** This async method is not available in Objective-C. Set `UIApplication.shared.applicationIconBadgeNumber = 0` to reset the badge directly. ## Auto-Badge Auto-badge automatically updates the badge number stored by Airship every time the app is started or foregrounded, instead of setting an exact value. #### Swift ```swift Airship.push.autobadgeEnabled = true ``` #### Objective-C ```objc UAirship.push.autobadgeEnabled = YES; ``` > **Important:** When using auto-badge, only modify the badge value through Airship methods to ensure the value stays in sync. # Interactive Notifications > Configure standard and custom interactive notification categories with action buttons for iOS push notifications. Interactive notifications allow users to take actions directly from the notification without opening your app. You can add buttons to notifications that perform specific actions when tapped. ## Standard Interactive Notifications Airship provides built-in interactive notification types with pre-configured action buttons. See [Built-In Interactive Notification Types](https://www.airship.com/docs/reference/messages/built-in-interactive-notifications/) for available types and button configurations. To use a standard interactive notification type, specify the category ID in your push payload. The notification will automatically display the appropriate action buttons. ## Custom Interactive Notification Categories You can define custom notification categories with specific actions tailored to your app's needs. > **Note:** Airship reserves category IDs prefixed with `ua_`. Any custom categories with that prefix will be ignored. ### Create a Custom Category #### Swift ```swift // Define an action for the category let categoryAction = UNNotificationAction( identifier: "category_action", title: "Action!", options: [.authenticationRequired, .foreground, .destructive] ) // Define the category let category = UNNotificationCategory( identifier: "custom_category", actions: [categoryAction], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: "Sensitive Content Hidden", options: [] ) // Register the custom category Airship.push.customCategories = [category] ``` #### Objective-C ```objc // Define an action for the category UNNotificationAction *categoryAction = [UNNotificationAction actionWithIdentifier:@"category_action" title:@"Action!" options:(UNNotificationActionOptionForeground | UNNotificationActionOptionDestructive | UNNotificationActionOptionAuthenticationRequired)]; // Define the category UNNotificationCategory *category = [UNNotificationCategory categoryWithIdentifier:@"custom_category" actions:@[categoryAction] intentIdentifiers:@[] options:UNNotificationCategoryOptionNone]; // Register the custom category UAirship.push.customCategories = [NSSet setWithArray:@[category]]; ``` ### Action Options When creating notification actions, you can specify the following options: - **`.foreground`** / `UNNotificationActionOptionForeground`: Opens the app when the action is tapped - **`.destructive`** / `UNNotificationActionOptionDestructive`: Displays the action button in red (use for destructive actions like "Delete") - **`.authenticationRequired`** / `UNNotificationActionOptionAuthenticationRequired`: Requires the device to be unlocked before the action can be performed ### Hidden Preview Placeholder The `hiddenPreviewsBodyPlaceholder` parameter specifies placeholder text that will be shown instead of the notification's body when the user has disabled notification previews for your app. This is useful for sensitive content that shouldn't be displayed in notification previews. ### Handle Action Responses When a user taps an action button, handle the response in your notification callback: #### Swift ```swift Airship.push.onReceivedNotificationResponse = { response in if response.actionIdentifier == "category_action" { // Handle the action } } ``` #### Objective-C ```objc UAirship.push.onReceivedNotificationResponse = ^(UNNotificationResponse *response) { if ([response.actionIdentifier isEqualToString:@"category_action"]) { // Handle the action } }; ``` ## Related Documentation - [Getting Started with Push Notifications](https://www.airship.com/docs/developer/sdk-integration/apple/push-notifications/getting-started/) # 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. ![Selecting App Clips as the identifier type](https://www.airship.com/docs/images/app-clip-identifier_hu_c7c5b6bc665a4d40.webp) *Selecting App Clips as the identifier type* 4. Specify the app ID of the parent app and the product name: ![Specifying the parent app ID and product name](https://www.airship.com/docs/images/app-clip-identifier2_hu_dd057b939ae88cc1.webp) *Specifying the parent app ID and product name* 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. ![Selecting the App Clip target type in Xcode](https://www.airship.com/docs/images/app-clip-target_hu_87e2d0a265a4c2c3.webp) *Selecting the App Clip target type in Xcode* 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`: ![Ephemeral notification configuration in Info.plist](https://www.airship.com/docs/images/app-clip-plist_hu_ad54638ec83033df.webp) *Ephemeral notification configuration in Info.plist* ## 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) # Quiet Time > Configure quiet time to prevent notifications from being displayed during specific hours while still receiving them. Quiet time allows you to suppress notifications during specific hours. Notifications are still received but won't be displayed to the user during the quiet time window. ## Configure Quiet Time #### Swift ```swift // Set quiet time from 7:30pm to 7:30am Airship.push.setQuietTimeStartHour(19, startMinute: 30, endHour: 7, endMinute: 30) // Enable quiet time Airship.push.quietTimeEnabled = true ``` #### Objective-C ```objc // Set quiet time from 7:30pm to 7:30am [UAirship.push setQuietTimeStartHour:19 startMinute:30 endHour:7 endMinute:30]; // Enable quiet time UAirship.push.quietTimeEnabled = YES; ```