INNER CODE UNIT · TypeScript
setupDefault
OneSignal/react-native-onesignal · src/index.ts:266
export function setupDefault(options?: LiveActivitySetupOptions) {
if (!isNativeModuleLoaded(RNOneSignal)) return;
if (Platform.OS === 'ios') {
RNOneSignal.setupDefaultLiveActivity(options ?? null);
}
}
/**
* Start a new LiveActivity that is modelled by the default`DefaultLiveActivityAttributes`
* structure. The `DefaultLiveActivityAttributes` is initialized with the dynamic `attributes`
* and `content` passed in.
*
* Only applies to iOS
*
* @param activityId: The activity identifier the live activity on this device will be started
* and eligible to receive updates for.
* @param attributes: A dynamic type containing the static attributes passed into `DefaultLiveActivityAttributes`.