Skip to content

About

Official Yournotify React Native and Expo SDK

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Yournotify React Native SDK

Client-safe SDK for React Native and Expo. It uses a short-lived Contact session token minted by a trusted server; never place a permanent Yournotify API key in a mobile bundle.

import * as SecureStore from 'expo-secure-store';
import { createYournotifyMobile } from '@yournotify/react-native';

const yournotify = createYournotifyMobile({
  sessionTokenProvider: ({ forceRefresh }) => feedcoverApi.getYournotifySession({ forceRefresh }),
  storage: { getItem: SecureStore.getItemAsync, setItem: SecureStore.setItemAsync },
  context: { integration_id: 'feedcover' },
});
await yournotify.track('content.viewed', { content_id: 'post_123' });
const summary = await yournotify.contact.summary();
await yournotify.push.register({ token: expoPushToken, platform: 'android', device_id: deviceId });

Failed network events are stored locally and delivered with await yournotify.flush() when connectivity returns. A token provider refreshes an expired Contact session once after a 401; it must call your own trusted backend and must never return a permanent Yournotify API key.

About

Official Yournotify React Native and Expo SDK

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages