React Native SDK — Quick Integration

Add SDDL to your React Native app, enable iOS Universal Links and Android App Links, and handle the deep link payload with a minimal init.

Installation

Autolinking is supported. Install the package and, for iOS, install pods.

# npm
npm i sddl-react-native-sdk

# yarn
yarn add sddl-react-native-sdk

# pnpm
pnpm add sddl-react-native-sdk

# iOS pods
npx pod-install

Requirements: React Native ≥ 0.71, iOS 12+, Android 5.0+.

iOS — Universal Links

  1. In Xcode open Target → Signing & Capabilities → + Capability and add Associated Domains.
  2. Add one of the entries:
    applinks:{YOUR_ID}.sddl.me
    # or your verified custom domain
    applinks:{your.custom.domain}
  3. Build & run on device. Make sure there are no capability warnings and your AASA is reachable.

Universal Links: setup & troubleshooting

Android — App Links

Declare the intent-filter in the activity that should receive links (usually MainActivity):

<activity
    android:name=".MainActivity"
    android:exported="true"
    android:launchMode="singleTop">

    <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="{YOUR_ID}.sddl.me"
            android:pathPrefix="/" /> <!-- or your custom domain -->
    </intent-filter>

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

</activity>

Digital Asset Links

In SDDL, open App Links configuration, enter your Package Name and SHA256 certificate fingerprints (debug + release). SDDL publishes assetlinks.json automatically for your domain.

# Debug
keytool -list -v -alias androiddebugkey \
  -keystore ~/.android/debug.keystore \
  -storepass android -keypass android

# Release (example)
keytool -list -v -alias YOUR_ALIAS -keystore /path/to/your-release.jks

Android App Links: setup & fingerprints

Usage

Initialize once (e.g., in your app root) and handle success/error. Dispose on unmount.

import React, { useEffect, useState } from 'react';
import { SafeAreaView, ScrollView, Text } from 'react-native';
import { Sddl, type LinkData } from 'sddl-react-native-sdk';

export default function App() {
  const [out, setOut] = useState('Waiting for SDDL…');

  useEffect(() => {
    Sddl.init({
      onSuccess: (data: LinkData) => setOut(JSON.stringify(data, null, 2)),
      onError:   (msg: string)     => setOut(`ERR: ${msg}`),
    });
    return () => Sddl.dispose();
  }, []);

  return (
    
      
        {out}
      
    
  );
}

Testing

  • Create a link in SDDL with metadata.
  • Install the app on a real device.
  • Tap the link:
    • App installed → OS delivers Universal/App Link → your app shows payload in the handler.
    • App not installed → store opens → on first launch call the SDK init to retrieve the payload.

Testing & QA playbook

Troubleshooting

  • iOS: Associated Domains must be verified and AASA reachable for your domain.
  • Android: android:autoVerify="true" and correct package name + SHA256 fingerprints in SDDL.
  • Pods: after installing the SDK, run npx pod-install.
  • Simulators: some Universal/App Link behaviors differ; test on a real device.