> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Action Handling

> Handle deep link callbacks and custom actions from MoEngage in-app messages in your iOS app.

## Deeplink callback in InApp

It is used to navigate users directly to a specific location or content within a mobile app.

### Default Handling

By default, SDK passes the deep link callback to the AppDelegate/SceneDelegate method .

If your application is running below iOS 13, then deep link callback is received in the AppDelegate methods:

<CodeGroup>
  ```swift Swift wrap theme={null}
  import UIKit

  // Custom Scheme Link
  func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
    
    //Call only if MoEngageAppDelegateProxyEnabled is NO in Info.plist
    MoEngageSDKAnalytics.sharedInstance.processURL(url) 
  }

  // Universal Links
  func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
    if userActivity.activityType == NSUserActivityTypeBrowsingWeb ,
      let incomingURL = userActivity.webpageURL{
      //Call only if MoEngageAppDelegateProxyEnabled is NO in Info.plist
      MoEngageSDKAnalytics.sharedInstance.processURL(incomingURL) 
    }
    //rest of the implementation
    return true
  }
  ```

  ```objective-c Objective C wrap theme={null}
  // Custom Scheme Link
  - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<uiapplicationopenurloptionskey,id> *)options {
    
    return  true;
  }

  // Universal Link
  - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler {
    
    return true;
  }
  @end
  ```
</CodeGroup>

If your application is above iOS 13, then a deeplink callback is received in the below ***SceneDelegate*** method:

<CodeGroup>
  ```swift Swift wrap theme={null}
  import UIKit

  // Custom Scheme Link
  func scene(_ scene: UIScene, openURLContexts URLContexts: Set) {
          let url = URLContexts.first?.url
          MoEngageSDKAnalytics.sharedInstance.processURL(url)
  }

  // Universal Scheme Link
  func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
          if let url =  userActivity.webpageURL {
              MoEngageSDKAnalytics.sharedInstance.processURL(url)
          }
      }
  }
  ```
</CodeGroup>

### Custom Handling

To receive the deeplink callback in the [*MoEngageInAppNativeDelegate*](https://moengage.github.io/ios-api-reference/Protocols/MoEngageInAppNativeDelegate.html) *,* do pass [MoEngageInAppConfig(shouldProvideDeeplinkCallback: true)](/developer-guide/ios-sdk/sdk-integration/basic/sdk-initialization) while initializing the MoEngageSDKConfig object.

Refer to the [doc](/developer-guide/ios-sdk/in-app-messages/in-app-nativ#non-intrusive-nudges) for callback methods.

<Warning>
  **SDK Version**

  Custom Deeplink Callback is supported MoEngageInApp @ 6.00.0.
</Warning>
