React Native SDK for AnnounceKit
React Native SDK enables you to implement AnnounceKit widgets in your React Native mobile apps, so you can increase feature awareness by sharing the latest product updates right inside your app. It shows the same widget you configure in the dashboard, so a widget you set up once renders consistently across iOS and Android builds of your React Native app.
With React Native SDK you can use following AnnounceKit features;
- Widgets with Badge Launcher
- Segmentation
- User Tracking
Getting started
- Create a widget in Engage > Widgets and copy its widget URL.
- Install the package and its web view dependency from npm (on iOS, also run
cd ios && pod install):
npm install announcekit-react-native react-native-webview
- Wrap your app in
AnnounceKitProviderand open the widget from any button:
import { AnnounceKitProvider, useWidget, useUnreadCount } from "announcekit-react-native";
function App() {
return (
<AnnounceKitProvider widget="https://announcekit.co/widgets/v2/XXXXXX">
<WidgetButton />
</AnnounceKitProvider>
);
}
function WidgetButton() {
const unread = useUnreadCount();
const [openWidget] = useWidget();
return <Button title={`${unread ?? 0} unread posts`} onPress={() => openWidget()} />;
}
Segmentation and user tracking
Pass user (id, name, email) and data to AnnounceKitProvider to track users and show different announcements to different audiences, the same options as the web widget. To identify users with a signed token instead, pass user_token (JWT). You can also pass lang and labels. Segmentation and user tracking are part of the Segmentation & User Tracking add-on.
FAQ
What does the React Native SDK show?
Your AnnounceKit widget, and the unread count for your own launcher. Content and design are managed from your AnnounceKit dashboard, so changes need no native rebuild.
Can I target specific users or segments from React Native?
Yes. Pass user identity and custom properties to the provider, then use AnnounceKit’s audience segmentation in the dashboard to show announcements to specific segments.
Does the SDK work on both iOS and Android builds?
Yes. The React Native SDK is a single JavaScript package (built on react-native-webview) that works on both platforms from the same React Native codebase.
Is there an extra cost to using the React Native SDK?
No. The SDK is free with any AnnounceKit plan; you only need an AnnounceKit account and a widget configured in your dashboard.
Why teams add a changelog widget to a mobile app
Mobile users rarely read app store release notes, so a shipped feature can go unnoticed for weeks. A badge inside the app surfaces new posts the moment a user opens it, without requiring an app update to change the copy, which is useful when you want to update announcement wording after a build has already shipped to the store. Because the widget content is managed from the AnnounceKit dashboard rather than compiled into the app binary, product and marketing teams can publish and edit posts without waiting on a new app release.
Please follow our GitHub repo for updates, implementation, and setup guides.
Resources: