Deep Linking
Deep linking allows users to open specific StorifyMe stories directly from shared links, providing a seamless experience when content is shared across platforms.
StorifyMe provides two approaches for implementing deep links:
Option 1: StorifyMe-Hosted Deep Links (Recommended)
StorifyMe automatically generates and hosts deep linking configuration files for both platforms. This is the simplest approach and requires no backend infrastructure on your end.
Step 1: Configure App Credentials in Dashboard
- Log in to your StorifyMe dashboard
- Navigate to Settings → Mobile
- Configure both platforms:
iOS Configuration:
- Team ID: Your Apple Developer Team ID
- Bundle ID: Your app's bundle identifier (e.g.,
com.yourcompany.app) - App Store ID: Your app's Apple App Store ID
Android Configuration:
- Package Name: Your app's package name (e.g.,
com.yourcompany.app) - SHA-256 Fingerprints: Your app signing certificate fingerprints
- Click Save
StorifyMe will automatically generate the configuration files at:
- iOS:
https://storifyme.xyz/.well-known/apple-app-site-association - Android:
https://storifyme.xyz/.well-known/assetlinks.json
Step 2: Platform Configuration
iOS Setup
Configure Associated Domains in Xcode:
-
Open your iOS project in Xcode:
ios/YourApp.xcodeproj -
Select your app target
-
Go to Signing & Capabilities
-
Click + Capability and add Associated Domains
-
Add the following domains:
applinks:storifyme.xyzapplinks:storifyme.com
Update Native Code:
Open ios/YourApp/AppDelegate.mm (or AppDelegate.m) and add:
#import <React/RCTLinkingManager.h>
// Add this method to handle universal links
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
return [RCTLinkingManager application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
Android Setup
Get SHA-256 Fingerprints:
# Debug keystore
cd android
./gradlew signingReport
# Look for SHA-256 under "Variant: debug"
# Or using keytool
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
# Release keystore
keytool -list -v -keystore android/app/your-release-key.keystore -alias your-key-alias
# Play App Signing (from Play Console)
# Go to: Your App → Setup → App integrity → App signing key certificate
Add ALL fingerprints to the StorifyMe dashboard.
Update AndroidManifest.xml:
Open android/app/src/main/AndroidManifest.xml and add intent filters:
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask">
<!-- Your existing intent filters -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- StorifyMe Deep Links - storifyme.xyz -->
<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="storifyme.xyz"
android:pathPrefix="/stories/YOUR_ACCOUNT_ID/" />
</intent-filter>
<!-- StorifyMe Deep Links - storifyme.com -->
<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="storifyme.com"
android:pathPrefix="/stories/YOUR_ACCOUNT_ID/" />
</intent-filter>
<!-- Support for /shorts/ path -->
<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="storifyme.xyz"
android:pathPrefix="/shorts/YOUR_ACCOUNT_ID/" />
</intent-filter>
<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="storifyme.com"
android:pathPrefix="/shorts/YOUR_ACCOUNT_ID/" />
</intent-filter>
</activity>
Important: Replace YOUR_ACCOUNT_ID with your actual StorifyMe account ID.
Step 3: Handle Deep Links in React Native
The deep link URL format is:
https://storifyme.xyz/stories/{ACCOUNT_ID}/{story_handle}
https://storifyme.xyz/shorts/{ACCOUNT_ID}/{story_handle}
Basic Implementation:
import React, { useEffect } from 'react';
import { Linking } from 'react-native';
import StorifyMe from 'react-native-storifyme';
const App = () => {
useEffect(() => {
// Handle deep links when app is already running
const handleUrl = (event: { url: string }) => {
handleDeepLink(event.url);
};
const subscription = Linking.addEventListener('url', handleUrl);
// Handle deep links when app is launched from link
Linking.getInitialURL().then((url) => {
if (url) {
handleDeepLink(url);
}
});
return () => {
subscription?.remove();
};
}, []);
const handleDeepLink = (url: string) => {
try {
const parsedUrl = new URL(url);
if (parsedUrl.protocol === 'https:') {
const handle = extractStoryHandle(parsedUrl);
if (handle) {
// Launch story directly
StorifyMe.openStoryByHandle(handle);
}
}
} catch (error) {
console.warn('Invalid deep link URL:', url);
}
};
const extractStoryHandle = (url: URL): string | null => {
const pathSegments = url.pathname
.split('/')
.filter((segment) => segment);
// For StorifyMe-hosted URLs: https://storifyme.xyz/stories/{ACCOUNT_ID}/{story_handle}
if (
pathSegments.length >= 3 &&
(pathSegments[0] === 'stories' || pathSegments[0] === 'shorts')
) {
return pathSegments[2];
}
return null;
};
return <YourAppContent />;
};
export default App;
Step 4: Testing StorifyMe-Hosted Deep Links
iOS Testing (Simulator):
# Test with storifyme.xyz
xcrun simctl openurl booted "https://storifyme.xyz/stories/YOUR_ACCOUNT_ID/test-story"
# Test with storifyme.com
xcrun simctl openurl booted "https://storifyme.com/stories/YOUR_ACCOUNT_ID/test-story"
Android Testing (ADB):
# Test with storifyme.xyz
adb shell am start -W -a android.intent.action.VIEW \
-d "https://storifyme.xyz/stories/YOUR_ACCOUNT_ID/test-story" \
com.yourcompany.app
# Test with storifyme.com
adb shell am start -W -a android.intent.action.VIEW \
-d "https://storifyme.com/stories/YOUR_ACCOUNT_ID/test-story" \
com.yourcompany.app
Replace:
YOUR_ACCOUNT_IDwith your StorifyMe account IDcom.yourcompany.appwith your app's package name
Physical Device Testing:
- Send yourself a message with a story link
- Tap the link on your device
- The app should open and display the story
Troubleshooting StorifyMe-Hosted Links
iOS Issues:
- Verify Associated Domains are correctly configured in Xcode
- Rebuild and reinstall the app
- Test on a physical device
- Check AASA file:
curl https://storifyme.xyz/.well-known/apple-app-site-association
Android Issues:
- Verify
android:autoVerify="true"is set - Check path prefix includes your
ACCOUNT_ID - Verify SHA-256 fingerprints in dashboard
- Clear app defaults: Settings → Apps → Your App → Open by default → Clear defaults
- Check verification:
adb shell pm get-app-links com.yourcompany.app
Option 2: Custom Domain Deep Links (Advanced)
Make sure you have configured your sharing domain in the StorifyMe Dashboard Settings. Set either Custom Domain OR Proxy - this domain will be used when links are copied/shared from your stories.
For a custom domain connected directly to StorifyMe, StorifyMe generates the association files automatically. Follow the custom-domain app links guide for the required dashboard settings and app configuration. The manual file-hosting instructions below apply to customer-managed proxies.
If your domain is served through a customer-managed proxy, configure the proxy to forward the association-file requests or host those files on the proxy. The app-side steps below apply to both direct custom domains and proxies.
Installation
Install the required packages:
npm install @react-native-async-storage/async-storage react-native-bootsplash
# For React Navigation (if using)
npm install @react-navigation/native @react-navigation/native-stack react-native-screens
For linking functionality, you can use React Navigation's built-in linking or implement your own solution.