Skip to content

Receive Smart Links on iOS

GetSocial Smart Links combine two types of mobile app linking:

  • Deep Linking provides a way to direct the user to a specific location within a mobile app rather than simply launching the app.
  • Deferred Deep Linking that allows users to deep link to content even if the app is not already installed.

Each Smart Link has associated referral data, which you can retrieve on the receiver side. This data consists of parameters you specify during link creation and additional metadata added by GetSocial.

Prerequisite

Dashboard Configuration

When the app will be live in the App Store, copy the App Store ID to the Dashboard. We use this ID to redirect the user to the correct page from the Smart Invites Landing Page.

To set up deep linking:

  1. Open your app in the iTunes web.
  2. Login to the GetSocial Dashboard.
  3. Ensure that Bundle ID, Team ID and App Store ID are filled and matches the app you are integrating:

    GetSocial Dashboard - iOS Apple App Id Configuration

Setup Deep Linking

iOS Installer Script configures everything automatically. If you’re not using the script read how to configure deep linking manually.

Retrieve Referral Data

Returned referral data contains:

  1. Predefined link params and custom key-value pairs added during link creation, or as URL query parameter overrides.
  2. Metadata added by GetSocial, e.g., channel, referrer user, whether we guarantee attribution, etc.

For a full list of available properties check the Smart Link params reference and API Reference.

You can retrieve referral data attached to the Smart Link when:

  • The app is launched for a first time after being installed by clicking on the GetSocial Smart Link.
  • The app was opened by clicking on the GetSocial Smart Link.

The code below show how to do it:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
[GetSocial referralDataWithSuccess:^(GetSocialReferralData * _Nullable referralData) {
    if (referralData != nil) {
        NSString * navigationPath = [referralData linkParams][@"$custom_path"]; // predefined key
        NSString * customValue1 = [referralData linkParams][@"custom_key_1"]; // custom key
        BOOL isGuranteedMatch = [referralData isGuaranteedMatch]; // added metadata

        NSLog(@"App started with referral data: %@", referralData);
    } else {
        NSLog(@"No referral data found");
    }
} failure:^(NSError * _Nonnull error) {
    NSLog(@"Failed to retrieve referral data, error: %@", error.description);
}];

Whitelist Test Devices

To get the install attribution on every install you have to whitelist your testing devices on the GetSocial Dashboard.
For more information check Whitelist Test Devices.

Troubleshooting

If the app does not open after the clicks on GetSocial Smart Link, one of the following may be a problem:

Option 1. Some apps are blocking iOS Universal Links, e.g., Smart Links will not work in Telegram.

Option 2. Outdated provisioning profiles after enabling Associated Domains for your App ID. To solve it, just download the latest provisioning profiles from Xcode settings or developer.apple.com.

Option 3. Universal links do not work with wildcard app identifiers (e.g., im.getsocial.*). You have to create a new specific app identifier and new provisioning profile for your app.

Option 4. New app.entitlements in not included in the correct build target. To solve the problem, include app.entitlements into the desired build target.

Next Steps

Give us your feedback! Was this article helpful?

😀 🙁