---
title: Deep linking
slug: experience/deep-linking
description: Deep linking
docTags: 
createdAt: 2023-08-11T08:48:27.543Z
---

## Overview

Once you have carefully read the article [List of Action URLs](docId\:HvlbwIwymM61GC7F6ZNfR) you will notice that Purple uses the following URL scheme for the internal usage of an action URL:
"<font color="#2166ae">**purple**</font>"

**A fictitious action URL could therefore look like this:**
"<font color="#2166ae">**purple://app/do_something**</font>"

At this point, there are two variants of executing a deep link in your Purple App.

*The manual variant by the potential app user:*

The potential app user taps on a deep link that is integrated into one of your websites, for example. This variant supports the fact that the app does not have to be installed.

*The automatic variant delivers a deep link to the device, for example via push or in-app message.*

For this variant, the app must already be installed and configured accordingly for the input channel used.

## USE-CASE: User taps on a deep link on your website

As an introduction, the following figure shows the very rough process of how a deep link is passed to your Purple App after the user tapped a deep link:

![very rough process of how a deep link is passed to your Purple App after the user tapped a deep link](https://api.archbee.com/api/optimize/ygR6KtT9QI_R0u3uKTJsm/9SPQaCAHApJCRHzGhejaB_documentationdeeplinks.png)

### Custom URL schemes

This feature relies on registering your Purple App with custom URL schemes in the operating system. This tells the operating system that this app can open deep links for the registered URL scheme.

**iOS**
To read more about the Apple feature in detail, continue reading at official documentation:
[https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app)

**Android**
To read more about Android's feature in detail, continue reading at official documentation:
[https://developer.android.com/training/app-links/deep-linking](https://developer.android.com/training/app-links/deep-linking)



**Create your custom URL scheme**

Before we get into the example, let's start with a warning:

:::hint{type="warning"}
If multiple apps register the same scheme, the app the system targets is undefined. There is no mechanism to change the app or to change the order apps appear in a Share sheet.
:::

To avoid this problem, after creating your app in Purple Manager, the default value is:
"**purple-**<font color="#3b9f0f">***your_app_package_name***</font>".

That way the scheme is unique since the package name is unique.

:::hint{type="info"}
**Example**

If the package name of your app is "<font color="#3b9f0f">***com.example.my_app***</font>", for example, the following scheme results with which your Purple App registers with the operating system:
"**purple-**<font color="#3b9f0f">***com.example.my_app***</font>"

The fictitious action URL mentioned above can thus be used as a deep link as follows:
"<font color="#2166ae">**purple-com.example.my_app://app/****do_something**</font>"
:::

**Are you migrating your app to Purple and already have a custom URL scheme for your app, or just want to use a different URL scheme as Purple's default one?**

You can configure this custom scheme in the Purple Manager:

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**General**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**Deeplink Scheme Name**</font>"

### Universal links (iOS only)

This feature relies on registering your Purple App to use Universal links. This feature is for use in iOS only.

**iOS**
To read more about the Apple feature in detail, continue reading at official documentation:
[https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content](https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content)

:::hint{type="info"}
Seamlessly link to content in your app or on your website. With&#x20;
universal links, you can always give users the most integrated mobile&#x20;
experience, even when your app isn’t installed on their device.

Quote from:
[https://developer.apple.com/ios/universal-links/](https://developer.apple.com/ios/universal-links/)
:::

You can configure this in the Purple Manager:

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**iOS**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**Associated Domain Prefix** </font>"

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**iOS**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**Apple App ID Prefix**</font>"

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**iOS**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**Deferred Deep Linking**</font>"

Do not be confused that one setting takes place under "<font color="#2166ae">**Deferred Deep Linking**</font>".

:::hint{type="warning"}
Within your Apple Developer Account you have to configure your app to enable the capability:

"<font color="#3b9f0f">**Associated domains**</font>"
:::

### Deferred deep linking

Theoretically, content from your Purple App can be linked to your website using deep links. If a user clicks on such a deep link and the corresponding Purple App is installed, the content addressed opens. If the potential app user has not installed this app, this is usually a *"dead end****".*** With the deferred deep link feature, the deep link can still be evaluated after installing your Purple App and the app user opens it for the first time.

This mechanism is currently supported by Purple itself and by Branch.

**Purple Manager**

:::hint{type="info"}
You can configure this in the Purple Manager.

***Settings location***

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**iOS**</font>" => "<font color="#2166ae">**Basic Settings**</font>" => "<font color="#2166ae">**Deferred Deep Linking**</font>"
:::

**Apple Developer Account**

:::hint{type="info"}
Within your Apple Developer Account you have to configure your app to enable the capability:

"<font color="#3b9f0f">**Associated domains**</font>".
:::

## USE-CASE: Deep link passed to your Purple App by an input channel via Push or In-App-Message

If your Purple App is already installed, the following channels for sending deep links can be used:

- Push messages
- In-app messages

These channels can be used but require the use of 3rd party SDKs.

### Push&#x20;

Typically used to notify app users about breaking news articles.

### In-App-Message

May be used to reach inactive subscribers to make a discount on a subscription.

### 3rd-Party

These 3rd-party SDKs support the input channels for deep links as follows:

| **SDK** | **Deep link via Push** | **Deep link via In-app message** |
| ------- | ---------------------- | -------------------------------- |
| Airship | yes                    | yes (by message center)          |
| Branch  | yes                    | no                               |



