# How to open universal link in the native app

**URL:** <https://discuss.appium.io/t/how-to-open-universal-link-in-the-native-app/45634>\
**Category:** Issues/Bugs\
**Created:** [March 21, 2025, 5:38pm UTC](https://discuss.appium.io/t/how-to-open-universal-link-in-the-native-app/45634 "2025-03-21T17:38:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harish1](https://discuss.appium.io/letter_avatar_proxy/v4/letter/h/b77776/32.png) [@Harish1](https://discuss.appium.io/u/Harish1)\
**Post date:** [March 21, 2025, 5:38pm UTC](https://discuss.appium.io/t/how-to-open-universal-link-in-the-native-app/45634/1 "2025-03-21T17:38:52Z")

</div>

I want to test a scenario where a universal link (https://) would open in the native app.  
I have created a driver with options having bundle id of the native app. Then did driver.get(“[https://appDomain.com](https://appDomain.com)”). This worked fine when did in iOS simulator l. But it did not work on real device in AWS device farm. It was opening the link in the browser.

How to open the link in native app for real ios devices?

---

<div class="post-metadata">

**Author:** ![mykola-mokhnach](https://discuss.appium.io/user_avatar/discuss.appium.io/mykola-mokhnach/32/4578_2.png) [@mykola-mokhnach](https://discuss.appium.io/u/mykola-mokhnach)\
**Post date:** [March 21, 2025, 10:59pm UTC](https://discuss.appium.io/t/how-to-open-universal-link-in-the-native-app/45634/2 "2025-03-21T22:59:47Z")

</div>

Try [appium-xcuitest-driver/docs/reference/execute-methods.md at master · appium/appium-xcuitest-driver · GitHub](https://github.com/appium/appium-xcuitest-driver/blob/master/docs/reference/execute-methods.md#mobile-deeplink)  
You may explicitly provide the bundle identifier of the target application to open the link with there

---

<div class="post-metadata">

**Author:** ![Harish1](https://discuss.appium.io/letter_avatar_proxy/v4/letter/h/b77776/32.png) [@Harish1](https://discuss.appium.io/u/Harish1)\
**Post date:** [March 22, 2025, 6:32am UTC](https://discuss.appium.io/t/how-to-open-universal-link-in-the-native-app/45634/3 "2025-03-22T06:32:42Z")

</div>

@mykola-mokhnach I have tried this method

var result = driver.executeScript(“mobile: deepLink”, Map.ofEntries(  
Map.entry(“url”, “value1”),  
Map.entry(“bundleId”, “value2”)  
));

It is returning null and it is just opening the app and not opening the url in the native app

I have also checked the plist of the app. It has Associated Domains entitlement configured, for handling universal links.
