@path-kit/react-native
v0.1.1
Published
PathKit React Native / Expo SDK — deferred deep links, attribution, native share sheet, clipboard fallback.
Maintainers
Readme
@path-kit/react-native
PathKit React Native / Expo SDK — deferred deep links, attribution, and native share-sheet integration. The Branch replacement that lets you sign up with a credit card and ship today.
Install
# Expo
npx expo install @path-kit/react-native expo-linking expo-clipboard expo-secure-store
# Bare React Native
npm install @path-kit/react-native expo-linking expo-clipboard expo-secure-store
# (the expo-* packages are optional but recommended — without them clipboard
# fallback and first-launch detection are skipped)Quickstart
import { useEffect } from 'react';
import PathKit from '@path-kit/react-native';
export default function App() {
useEffect(() => {
(async () => {
await PathKit.configure({
apiKey: process.env.EXPO_PUBLIC_PATHKIT_KEY,
appId: 'app_xxx'
});
PathKit.onDeepLink(({ code, source, data }) => {
console.log('deep link', code, source, data);
// → route to the right screen
});
// First-launch deferred deep link (clipboard → IP fingerprint → done)
await PathKit.matchInstall();
})();
}, []);
return null;
}Share content (Branch Universal Object equivalent)
async function shareRecipe(recipe) {
await PathKit.share({
title: recipe.name,
description: recipe.tagline,
image: recipe.coverUrl,
canonicalUrl: `https://recipes.example/${recipe.id}`,
data: { recipe_id: recipe.id }
});
// Returns { url, code, shared } and opens the native share sheet.
}Universal Links / App Links setup
PathKit hosts AASA and assetlinks per customer. After you create your app in the PathKit dashboard:
iOS — add to your app.json:
{
"ios": {
"associatedDomains": ["applinks:go.pathkit.dev"]
}
}Android — add to your AndroidManifest.xml:
<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="go.pathkit.dev" />
</intent-filter>Then visit https://pathkit.dev/diagnose and paste your bundle ID / package — we'll probe AASA, assetlinks, and your URL scheme live and tell you what's broken.
License
MIT
