Pushlio push notification SDK — unlimited subscribers, pay per push. pushlio.app
npm install pushlio-react-native @react-native-firebase/app @react-native-firebase/messaging @notifee/react-native @react-native-async-storage/async-storage
cd ios && pod install(Optional: if react-native-device-info is installed, model/brand are collected automatically.)
index.js — at the very top (required for Android background messages):
import { Pushlio } from 'pushlio-react-native';
Pushlio.registerBackgroundHandler();App.tsx:
useEffect(() => {
Pushlio.init({
appId: 'YOUR-APP-ID',
apiUrl: 'https://pushlio.app/api/ingest',
});
Pushlio.requestPermission();
Pushlio.onClick((n) => {
if (n.effectiveDeepLink) Linking.openURL(n.effectiveDeepLink);
console.log(n.data); // key-value params
});
}, []);Optional:
Pushlio.login('user_42');
Pushlio.setTag('premium', 'true');
Pushlio.trackEvent('level_completed', { level: 5 });
Pushlio.setSubscribed(false); // opt-outFor "delivered" receipts + big images, create a Notification Service
Extension target in Xcode and replace the generated
NotificationService.swift with the one shipped in this package:
ios/NotificationService.swift.
No App Group required.
- Android: data-only FCM rendered via notifee (image + up to 3 buttons);
delivered/clickedreceipts are queued and flushed when online. - iOS: alert push shown by the system; the NSE reports the receipt; clicks arrive via
onNotificationOpenedApp/getInitialNotification. - Only messages marked
ph="1"are handled — your app's own FCM traffic is never touched.
Flip features without a store release — values resolve per device via segments.
if (Pushlio.featureFlag('new_home')) return <NewHome />
const text = Pushlio.remoteConfig('welcome_text', 'Hi')
const limit = Pushlio.remoteConfigNumber('daily_limit', 10)
await Pushlio.syncConfig() // manual refresh (e.g. AppState 'active')
Pushlio.onConfigChanged((flags) => setFlags(flags))Values are cached in AsyncStorage: offline apps keep the last known values. See docs/feature-flags.md.
See the repo root guide (maintainers): docs/sdk-yayinlama.md — npm steps.