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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@developer_tribe/react-native-comnyx

v0.16.1

Published

React Native chat component with integrated support panel, enabling real-time customer communication and efficient agent workflow management.

Readme

Comnyx Push Notification Service Documentation

Installation

npm install @developer_tribe/react-native-comnyx
# or
yarn add @developer_tribe/react-native-comnyx

Required Peer Dependencies

For persistent storage support, you need to install react-native-mmkv:

npm install react-native-mmkv
# or
yarn add react-native-mmkv

Then, rebuild your app:

# For iOS
cd ios && pod install && cd ..
npx react-native run-ios

# For Android
npx react-native run-android

Note: If you don't install react-native-mmkv, the SDK will use in-memory storage as a fallback. This means your data will not persist between app restarts.

iOS Podfile (required for React Native 0.85+)

React Native 0.85 ships React-Core as a prebuilt XCFramework whose umbrella header is not compatible with Xcode 26's strict Clang explicit modules. Without the patch below, pod install succeeds but xcodebuild fails while compiling the React-Core umbrella.

Comnyx ships a helper that applies the required build setting to every pod target. Wire it into your ios/Podfile:

require_relative '../node_modules/@developer_tribe/react-native-comnyx/ios/comnyx_post_install'

# ...

target 'YourApp' do
  config = use_native_modules!
  use_react_native!(:path => config[:reactNativePath], :app_path => "#{Pod::Config.instance.installation_root}/..")

  post_install do |installer|
    comnyx_post_install(installer)

    react_native_post_install(installer, config[:reactNativePath], :mac_catalyst_enabled => false)
  end
end

Then reinstall pods:

cd ios && pod install && cd ..

The helper is a no-op on React Native < 0.85, so it is safe to add before upgrading.

Basic Setup (Required)

1. Initialization and Login

// Initialize Comnyx with your token
Comnyx.init({
  projectId: 'YOUR_TOKEN',
});

// Login with user's external ID
await Comnyx.login({
  externalId: 'YOUR_USER_ID',
});

// Logout when needed
await Comnyx.logout();

Support Implementation (Optional)

1. Data Collection

// Collect relevant user data
Comnyx.collectData('userType', 'your_user_type');
Comnyx.collectData('deviceType', 'iOS');
Comnyx.collectData('userLanguage', 'en');

2. Support Component

const SupportScreen = () => {
  return (
    <ComnyxSupport
      fake={false}
      language="en"
      theme="dark"
      onBack={() => navigation.goBack()}
      themes={{}}
    />
  );
};

3. Media Attachments in Support (iOS Info.plist)

The support UI lets users attach images and videos. On Android the system Photo Picker (Android 13+) or the document picker (older) handles this permission-free. On iOS the SDK uses PHPicker on iOS 14+ (no permission needed) and falls back to UIImagePickerController on iOS 13.

If you ship iOS 13 support, add the following to your host app's Info.plist so the fallback works without crashing:

<key>NSPhotoLibraryUsageDescription</key>
<string>Needed to attach photos and videos to support conversations.</string>

If your deployment target is iOS 14+, this key is not strictly required but App Store reviewers often expect it whenever PHPickerViewController is linked.

Push Notifications Setup (Optional)

1. Account Prerequisites

  1. Apple Developer Account Setup:

    • Go to Apple Developer Account → Keys
    • Generate and download the key file (.p8)
    • Upload the .p8 file to Comnyx panel
  2. Firebase Setup:

    • Implement Firebase in your project
    • Obtain Firebase secret key
    • Configure Google Services

2. iOS Configuration

Add to your Info.plist:

<key>NSUserNotificationsUsageDescription</key>
<string>We need to send you notifications for important updates.</string>

<key>NSUserNotificationsEnabled</key>
<true/>

<key>UIBackgroundModes</key>
<array>
    <string>remote-notification</string>
</array>

3. Xcode Settings

  1. Enable Remote Notifications:

    • Open Xcode → Target's capabilities
    • Enable "Background Modes"
    • Check "Remote Notifications"
  2. Add Push Notifications:

    • Select target → "Signing & Capabilities"
    • Add "Push Notifications" capability

4. Platform-Specific Requirements

Android: Handle New Intents

In your MainActivity.kt, add the following method to handle notification intents:

override fun onNewIntent(intent: Intent) {
    super.onNewIntent(intent)
    ComnyxModule.handleNewIntent(intent)
}

iOS: Register Device Tokens

In your AppDelegate.swift, add these methods to handle push notification registration:

override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    Comnyx.registerDeviceToken(deviceToken)
}

override func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
    Comnyx.registerDeviceTokenFailed(error)
}

5. Notifications Code Setup

// Initialize notifications
await ComnyxNotifications.optIn();
await ComnyxNotifications.initialize();

5. Notification Event Listeners

useEffect(() => {
  // Set up event listeners
  const subscriptions = [
    // Listen for token initialization
    ComnyxNotifications.addEventListener('TOKEN_INIT', (data) => {
      console.info('Token received:', data.token);
    }),

    // Listen for token initialization failures
    ComnyxNotifications.addEventListener('TOKEN_FAILED', (data) => {
      console.info('Token initialization failed:', data);
    }),

    // Listen for incoming notifications
    ComnyxNotifications.addEventListener('NOTIFICATION_RECEIVED', (data) => {
      console.info('Notification received:', data);
    }),

    // Listen for notification clicks
    ComnyxNotifications.addEventListener('NOTIFICATION_CLICKED', (data) => {
      console.info('Notification clicked:', data);
    }),
  ];

  // Cleanup subscriptions when component unmounts
  return () => {
    subscriptions.forEach((subscription) => subscription.remove());
  };
}, []);

Complete Implementation Example

import { Comnyx, ComnyxNotifications } from 'comnyx-rn';
import { useEffect } from 'react';

// Basic Setup (Required)
Comnyx.init({
  token: 'YOUR_TOKEN',
});
await Comnyx.login({ externalId: 'USER_ID' });

// Support Setup (Optional)
Comnyx.collectData('userType', 'premium');
Comnyx.collectData('deviceType', 'iOS');
Comnyx.collectData('userLanguage', 'en');

// Notifications Setup (Optional)
await ComnyxNotifications.optIn();
await ComnyxNotifications.initialize();

// Notification Event Listeners
useEffect(() => {
  const subscriptions = [
    ComnyxNotifications.addEventListener('TOKEN_INIT', (data) => {
      console.info('Token received:', data.token);
    }),
    ComnyxNotifications.addEventListener('TOKEN_FAILED', (data) => {
      console.info('Token initialization failed:', data);
    }),
    ComnyxNotifications.addEventListener('NOTIFICATION_RECEIVED', (data) => {
      console.info('Notification received:', data);
    }),
    ComnyxNotifications.addEventListener('NOTIFICATION_CLICKED', (data) => {
      console.info('Notification clicked:', data);
    }),
  ];

  return () => {
    subscriptions.forEach((subscription) => subscription.remove());
  };
}, []);

// Support Screen Component
const SupportScreen = () => {
  return (
    <ComnyxSupport
      fake={false}
      language="en"
      theme="dark"
      onBack={() => navigation.goBack()}
      themes={{}}
    />
  );
};

// Logout when user signs out
const handleLogout = async () => {
  await Comnyx.logout();
};

Important Notes

  • Replace 'YOUR_TOKEN' with your actual Comnyx token
  • Replace 'USER_ID' with your actual user identification
  • Customize collected data based on your needs
  • Ensure all prerequisites are properly configured

Troubleshooting

  • Verify Xcode capabilities are enabled
  • Confirm .p8 file is uploaded to Comnyx panel
  • Check Firebase configuration
  • Verify bundle identifier matches Apple Developer account