npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-chottulink-sdk

v1.0.5

Published

ChottuLink - Best DeepLink provider and drop-in replacement for Firebase Dynamic Links. Comprehensive DeepLink solution for Native Android, iOS, Flutter, and React Native. One link for both Apple Store and Google Play Store. Number one developer's choice

Downloads

309

Readme

ChottuLink React Native SDK LEGACY

npm version License: MIT Platform React Native

ChottuLink is the best DeepLink provider and drop-in replacement for Firebase Dynamic Links. Our comprehensive DeepLink solution supports Native Android, iOS, Flutter, and React Native applications with one link for both Apple Store and Google Play Store.

✨ Key Features

  • 🔥 Drop-in Replacement for Firebase Dynamic Links - Seamless migration from Firebase

  • 💻📱 Cross-Platform Support - Native Android, iOS, Flutter, and React Native

  • 🔗 One Link, Multiple Stores - Single link works for both Apple Store and Google Play Store

  • ⚡ Lightning Fast - Optimized for performance and reliability

  • 📊 Advanced Analytics - Comprehensive tracking and insights

  • 🛡️ Enterprise Ready - Scalable solution for businesses of all sizes

  • 📲 App Deep Linking - Navigate users directly to specific app screens

  • 📧 Marketing Campaigns - Track email campaigns with custom parameters

  • 📱 Social Media Sharing - Share app content with dynamic links

  • 🛒 E-commerce - Drive users to specific products or offers

  • 🔄 Firebase Migration - Easy migration from Firebase Dynamic Links

React Native Compatibility

  • React Native: Minimum version 0.67.3
  • Node.js: Minimum version 16

Expo Compatibility

⚠️ Important: This SDK requires custom native modules and is not compatible with Expo Go.

Supported:

  • Expo Dev Build - Full functionality available
  • Bare React Native - Full functionality available
  • Expo Go - Not supported

For Expo users: Use Expo Dev Build instead of Expo Go.

📦 Installation

$ npm install react-native-chottulink-sdk --save

iOS Configuration

To enable deep link handling on iOS, you need to add the following methods to your AppDelegate.m:

// ... existing imports ...
#import "React/RCTLinkingManager.h"

@implementation AppDelegate
  // ... existing code ...

  // Add these methods for deep link handling
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [RCTLinkingManager application:app openURL:url options:options];
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
  return [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
}
@end

Android Configuration

If you encounter build issues on Android, try the following:

  1. Update Gradle version in android/build.gradle:
buildscript {
    ext {
        // Change gradle to 7.4.2
        gradleVersion = "7.4.2"
    }
}
  1. Add exclusion configuration in android/app/build.gradle:
android {
    // ... existing config
    
    configurations.all {
        exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
    }
}

🚀 Quick Start

1. Initialize the SDK

import { initializeChottuLink } from 'react-native-chottulink-sdk';

// Initialize with your API key
initializeChottuLink('your-api-key-here');

2. Create Dynamic Links

⚠️ Deprecated: The createLink function has been deprecated. Please use createDynamicLink instead.

Using createDynamicLink (Recommended)

import { createDynamicLink } from 'react-native-chottulink-sdk';

const linkConfig = {
  destinationURL: 'https://your-app.com/screen/123',
  domain: 'your-domain.chottu.link',
  iosBehaviour: 2, // 1 = browser, 2 = app
  androidBehaviour: 1, // 1 = browser, 2 = app
  linkName: 'custom-link-name', // Optional: Custom name for the link
  selectedPath: 'custom-path', // Optional: Custom path for the link
  socialTitle: 'Check out this amazing content!',
  socialDescription: 'Discover what\'s new in our app',
  socialImageUrl: 'https://your-domain.com/image.jpg',
  utmSource: 'email',
  utmMedium: 'newsletter',
  utmCampaign: 'welcome',
  utmContent: 'header',
  utmTerm: 'new-user'
};

try {
  const result = await createDynamicLink(linkConfig);
  console.log('Generated link:', result.shortURL);
} catch (error) {
  console.error('Failed to create link:', error);
}

Using createLink (Deprecated)

// ⚠️ This function is deprecated. Use createDynamicLink instead.
import { createLink } from 'react-native-chottulink-sdk';

const linkConfig = {
  destinationURL: 'https://your-app.com/screen/123',
  domain: 'your-domain.chottu.link',
  iosBehaviour: 2, // 1 = browser, 2 = app
  androidBehaviour: 1, // 1 = browser, 2 = app
  socialTitle: 'Check out this amazing content!',
  socialDescription: 'Discover what\'s new in our app',
  socialImageUrl: 'https://your-domain.com/image.jpg',
  utmSource: 'email',
  utmMedium: 'newsletter',
  utmCampaign: 'welcome',
  utmContent: 'header',
  utmTerm: 'new-user'
};

try {
  const shortLink = await createLink(linkConfig);
  console.log('Generated link:', shortLink);
} catch (error) {
  console.error('Failed to create link:', error);
}

3. Set up Event Listeners for the SDK

import { handleLink } from 'react-native-chottulink-sdk';
import { Linking } from 'react-native';

useEffect(() => {
    const handleInitialURL = async () => {
        const initialUrl = await Linking.getInitialURL();
        if (initialUrl) {
            handleLink(initialUrl);
        }
    };
    
    handleInitialURL().then();
}, []);

useEffect(() => {
    const subscription = Linking.addEventListener('url', event => {
        handleLink(event.url);
    });

  return () => subscription?.remove();
}, []);

4. Handle Incoming Links

import { NativeEventEmitter, NativeModules } from 'react-native';

const { ChottuLinkEventEmitter } = NativeModules;
const eventEmitter = new NativeEventEmitter(ChottuLinkEventEmitter);

// Called when a deep link or deferred link is successfully resolved
const deepLinkSubscription = eventEmitter.addListener(
    'ChottuLinkDeepLinkResolved',
    data => {
        
        // Tip: ➡️ Navigate to a specific page or take action based on the link
        
        console.log('Deep link resolved:', data);
        console.log('URL:', data.url);
        console.log('Metadata:', data.metadata);
    },
);

// Called when there's an error resolving the deep link
const deepLinkErrorSubscription = eventEmitter.addListener(
    'ChottuLinkDeepLinkError',
    data => {
        console.log('❌ Deep link error:', data);
        console.log('Original URL:', data.originalURL);
        console.log('Error:', data.error);
    },
);

5. (Optional) Get AppLink Data from the Deeplink URL directly

import { getAppLinkDataFromUrl } from 'react-native-chottulink-sdk';

try {
  const linkData = await getAppLinkDataFromUrl('https://your-domain.chottu.link/abc123');
  console.log('Link data:', linkData);
} catch (error) {
  console.error('Failed to extract link data:', error);
}

Expected Output:

{ 
    "isDeferred": false,
    "link": "https://your-app.com/screen/123",
    "shortLink": "your-domain.chottu.link/abc123",
    "shortLinkRaw": "https://your-domain.chottu.link/abc123?fbclid=12345678"
}

🏷️ Keywords

deep link, dynamic link, firebase replacement, react native deep link, ios deep link, android deep link, flutter deep link, app linking, universal link, app store link, play store link, campaign tracking, deeplink sdk, mobile deep linking, cross platform deep link