SDK Guide

Flutter Deep Linking SDK

Add deep linking to your Flutter app with a single SDK. Works on iOS and Android with full support for deferred deep linking, install attribution, and custom domains.

Quick Start

1

Install the SDK

flutter pub add ulink
2

Initialize in main()

import 'package:ulink/ulink.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await ULink.configure(apiKey: 'your-api-key');

  runApp(MyApp());
}
3

Handle incoming links

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();

    // Handle links when app is opened
    ULink.instance.onLink((link) {
      final path = link.path;
      final params = link.parameters;

      // Route user to correct content
      Navigator.pushNamed(context, path, arguments: params);
    });

    // Check for deferred deep link (post-install)
    ULink.instance.getInitialLink().then((link) {
      if (link != null) {
        // Handle the link that brought user here
      }
    });
  }
}

Platform Configuration

iOS
Universal Links

Add the Associated Domains entitlement in Xcode:

  1. Open your iOS project in Xcode (ios/Runner.xcworkspace)
  2. Select your target → Signing & Capabilities
  3. Click "+ Capability" and add "Associated Domains"
  4. Add: applinks:yourapp.ulink.ly

ULink automatically hosts your AASA file. No additional server configuration needed.

Android
App Links

Add intent-filters to AndroidManifest.xml:

<activity ...>
  <intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data
      android:scheme="https"
      android:host="yourapp.ulink.ly" />
  </intent-filter>
</activity>

ULink automatically hosts your assetlinks.json file for App Links verification.

Deferred Deep Linking

Deferred deep linking preserves link context through the app install flow. When a user clicks a link, installs your app, and opens it—they land exactly where you intended.

How it works:

  1. 1
    User clicks your ULink on mobile web or social media
  2. 2
    ULink detects the app isn't installed and redirects to App Store / Play Store
  3. 3
    Link context is stored with device fingerprint
  4. 4
    User installs and opens the app
  5. 5
    SDK retrieves the original link and delivers it via getInitialLink()
// Check for deferred deep link on first launch
final deferredLink = await ULink.instance.getInitialLink();

if (deferredLink != null) {
  // User came from a link before installing
  final referralCode = deferredLink.parameters['ref'];
  final productId = deferredLink.parameters['product'];

  // Credit referral, navigate to product, etc.
}

Frequently Asked Questions

Ready to add deep linking to Flutter?

Create a free account and get your API key. Most teams are live in under 30 minutes.