How to find Deeplink scheme of any iOS application

Punyapat Sessomboon
5 min readAug 26, 2023

--

Why we need Deeplink scheme?

There are a few use cases where you need to find Deeplink scheme of any iOS application. For example you will implement mobile banking payment method on your e-commerce application and you want to check whether a user has a target mobile banking application installed. You can do it by:

UIApplication.shared.canOpenURL(<scheme>://xxx)

This xxx part can be anything as long as you have the right scheme.

If the mobile banking application is not installed, your application should not allow a user to select such bank as a payment method because the user won’t be able to complete the purchase anyway (also a bad UX).

Limitations

In this article, I will explain how to find Deeplink scheme of any iOS application with these 2 limitations

  1. We can only find a scheme of the Deeplink, not the entire supported Deeplink format. In that case you either need to have access to source code or the application owner has a proper document for it.
    For example if the Deeplink format is pomelofashion://catgegory/123 we will be able to find the pomelofashion:// part, but not category/123
  2. This approach works only with the application which you can installed from App Store (unless you can obtain .ipa from somewhere else). This also means it will not work unless you can install the application from App Store e.g. it’s not free and you don’t want to pay for it or it is not available in your country.

Two main steps

  1. Obtain .ipa file from App Store (or somewhere else). In this article I will show you how to get .ipa from App Store.
  2. Extract Deeplink Scheme from .ipa file

I will start with the step 2 in case you already have .ipa file you don’t have to read through step 1.

Once you have .ipa

1. Find .ipa of the iOS application you are looking for the Deeplink.

Pomelo Fashion .ipa file

2. Unzip it and you should see something like this.

3. Use terminal to go to Payload/<application-name>.app

You cannot double-click .app file to go inside the directory. Mac will try to run the application instead. That’s why you need terminal

cd Payload/Pomelo.app
open . # open Finder

4. See content of info.plist file and look for CFBundleURLSchemes and there you should see scheme for the Deeplink.

<dict>
<key>CFBundleURLName</key>
<string>com.pomelofashion.pomelofashion</string>
<key>CFBundleURLSchemes</key>
<array>
<string>pomelofashion</string>
</array>
</dict>

It means this iOS application support pomelofashion://<anything> format and you can check whether user has this application installed using UIApplication.shared.canOpenURL(url)

Don’t forget to add scheme into LSApplicationQueriesSchemes too

Get .ipa file from App Store

Extract Deeplink scheme from .ipa is easy, but to get access to .ipa is another story 😌

There is another well-known tool you can use to get .ipa file from App Store but it takes some pre-configuration steps https://github.com/majd/ipatool

Here are steps to get .ipa file from App Store

1. Install the application you want to find Deeplink into your iPhone/iPad. Don’t worry you can remove it later.

2. Download Apple Configurator https://apps.apple.com/us/app/apple-configurator/id1037126344 into your mac.

3. Connect you iPhone/iPad to you mac and open Apple Configurator

Apple Configurator with iPhone connected

4. Double click iPhone

5. Make sure you still have the application you try to find Deeplink Scheme installed on your iPhone.

6. Click Add button in the top navigation bar and select Apps

7. Search for the target application

If you can’t find the app you are looking for, it means the app is still not in the list of Purchased App (installed app) on the Apple account you use with Apple Configurator. Make you use this Apple account to download and install the app on your iPhone first.

8. Select the app and click Add

9. You should see pop-up like this because you already have the app installed on your device. Don’t click anything yet and leave the pop-up open.

Here is how it works, Apple Configurator must have downloaded .ipa file into somewhere in your Mac in order to install this app into your iPhone. While the pop-up is still opened, the cache .ipa won’t be removed (because you neither select Stop or Replace or Skip yet).

10. Open terminal and go to cache directory of Apple Configurator

cd /Users/perth/Library/Group Containers/K36BKF7T3D.group.com.apple.configurator/Library/Caches/Assets/TemporaryItems/MobileApps

11. There you should see a directory with long name. In my case, it is 89FCEB7A-EE85–4661–872C-126CFBA7D248 Just go inside that directory and then you will see a directory with target application ID, again go inside that directory

And now you should see the .ipa file!

.ipa file

Now follow the previous step “Once you have .ipa” to get the Deeplink scheme. Happy coding!

--

--