# Deep Links for the Apple SDK

Configure deep link handling for Airship messaging.

Deep linking allows Airship messaging to open your app to specific resources or screens. When a user interacts with a message (notification, in-app message, etc.), the deep link can navigate them directly to the relevant content in your app.

## Listening for deep links

The SDK provides a way to listen for deep links so you can handle them in your app. This handler receives all deep links except for Message Center and Preference Center display requests, which are handled automatically by their respective features.

> **Note:** For Message Center and Preference Center display requests, see [Embedding the Message Center](https://www.airship.com/docs/developer/sdk-integration/apple/message-center/embedding/#handling-display-requests) and [Embedding the Preference Center](https://www.airship.com/docs/developer/sdk-integration/apple/preference-center/embedding/#handling-display-requests).



#### Swift



Set the deep link listener [after takeOff](https://www.airship.com/docs/developer/sdk-integration/apple/installation/getting-started/):

```swift
// Set deep link callback
Airship.onDeepLink = { url in
    // Handle deep link asynchronously
    await someNavigationTask(url)
}
```



#### Objective-C



Conform to `UADeepLinkDelegate` and set the delegate [after takeOff](https://www.airship.com/docs/developer/sdk-integration/apple/installation/getting-started/):

```objc
@interface AppDelegate() <UADeepLinkDelegate>
@end

@implementation AppDelegate

// ... in didFinishLaunchingWithOptions, after takeOff ...
UAirship.deepLinkDelegate = self;

- (void)receivedDeepLink:(NSURL *_Nonnull)deepLink
       completionHandler:(void (^_Nonnull)(void))completionHandler {
    // Handle deep link
    completionHandler();
}

@end
```




