smartlinks
v2.0.3
Published
Unified SmartLinks React Native SDK — analytics, ads, feedback, apps, community, blogs
Readme
SmartLinks React Native SDK
Unified React Native SDK for SmartLinks — analytics, deep links, ads, feedback, cross-promo apps, community, blogs, and AI Gateway.
Documentation: Getting started · Customization · API reference · Native setup
Install
npm install smartlinks react-native-smartlinks react-native-safe-area-context
# Optional — feedback attachments
npm install react-native-document-picker
# iOS
cd ios && pod installAndroid pulls live.smartlinks:smartlinks-sdk-core from Maven Central via react-native-smartlinks.
Quick start
import { SmartLinks } from 'smartlinks';
await SmartLinks.initialize({
apiKey: 'sk_your_api_key',
isDebug: __DEV__,
initializeAds: true,
appVersion: '1.0.0',
customization: {
theme: { colors: { primary: '#059669' } },
},
});
SmartLinks.analytics.sendEvent('app_open', { screen: 'home' });
SmartLinks.analytics.getLink((route) => {
console.log('Deep link:', route.route, route.params);
});Modules
| Module | Usage |
|--------|--------|
| Analytics | SmartLinks.analytics.sendEvent, getLink, generateLink, promo/IAP |
| Ads | <SmartLinksBanner adService={SmartLinks.ads} /> |
| Feedback | SmartLinks.openFeedback(navigation) or <FeedbackScreen /> |
| Apps | SmartLinks.openApps(navigation) or <AppsScreen /> |
| Community | SmartLinks.community.open(navigation) + Google access token |
| Blogs | SmartLinks.blogs.open(navigation) or <BlogsScreen /> |
| AI Gateway | SmartLinks.ai.chat(), SmartLinks.ai.runPipeline() |
Android deep links
<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="smartlinks.live"
android:pathPrefix="/l/{{APP_SLUG}}" />
</intent-filter>iOS
Autolinking via CocoaPods. Add Associated Domains: applinks:smartlinks.live.
