Jake

React Native SDK

Add Jake Messenger to React Native and Expo apps

React Native SDK

TL;DR: Install the package. Rebuild the native app (not just JS reload). Configure, authenticate, present. React Native 0.72+, iOS 15+, Android API 23+.

Cannot run in Expo Go — use a development build.

1. Install

npm install @tryjakeai/react-native
cd ios && pod install

Use version 0.2.2+ (0.1.0 crashes on iOS with Swift 6). Rebuild the app after installing.

2. Configure

import { Jake } from '@tryjakeai/react-native';

await Jake.configure({
  workspaceId: 'YOUR_WORKSPACE_ID',
  publicKey: 'YOUR_PUBLIC_KEY',
  messengerUrl: 'https://widget.tryjake.ai/messenger',
});

3. Authenticate

Your backend creates the token. Use a stable internal ID, not an email.

const session = await createSupportSession();
await Jake.authenticate(session.userId, session.token);

4. Present

<Pressable onPress={() => Jake.present()}>
  <Text>Contact support</Text>
</Pressable>

5. Logout

await Jake.logout(); // always before authenticating a different user

Events

Jake.addEventListener(JakeEvent.unreadCountChanged, ({ count }) => { /* badge */ });
Jake.addEventListener(JakeEvent.authenticationExpired, async () => { /* refresh */ });

Attributes and tracking

await Jake.track('subscription_upgraded', { plan: 'pro' });
await Jake.setUserAttributes({ company: 'Acme' });

Error copy for customers

Never expose workspace IDs, keys, or vendor names. Use generic messages:

  • "Support is still being set up. Please try again soon."
  • "We couldn't connect to support. Check your connection and try again."

Troubleshooting

  • Native module not linked — rebuild the app. Run pod install on iOS. Expo Go won't work.
  • Crash on open (0.1.0) — upgrade to 0.2.2+, rebuild.
  • authentication_required — configure → authenticate → present, in that order.

Next: Go-live checklist →

On this page