@radhya/mach-push-react-native
v0.1.4
Published
MACH Push for React Native and Expo development builds
Downloads
116
Readme
@radhya/mach-push-react-native
Provider-neutral MACH Push for bare React Native and Expo development builds.
The recommended setup requires no application wiring:
mach push setupThe command installs this package, adds automatic startup to the app entry
point, and creates mach-push.ts (or .js) with editable receive, tap,
registration, permission, and error callbacks. Re-running setup preserves that
file. The generated config can be project-only; Mach resolves the project's
single active push app during registration.
For a custom integration, use the low-level client:
import { createMachPush } from "@radhya/mach-push-react-native";
import { machPushConfig } from "./mach-push.generated";
const push = createMachPush(machPushConfig);
await push.requestPermission();
const registration = await push.register();
push.addNotificationReceivedListener(console.log);
push.addNotificationResponseReceivedListener(console.log);Expo Go is not supported. Expo apps use @radhya/mach/expo-plugin from the
main @radhya/mach package and then create a development or production build.
Android requires the app's Firebase configuration.
Provider credentials are managed from the normal Mach credentials flow:
mach credentialsChoose Push Notifications, then upload the APNs key or Firebase service-account JSON for the selected bundle/package.
