Skip to main content
Version: 0.22.0

Variable: useCallKitService()

const useCallKitService: (config) => void

Defined in: packages/react-native-client/src/hooks/useCallKit.ts:192

A convenience hook for automatically managing CallKit session lifecycle on iOS. Does nothing on other platforms. This hook automatically starts a CallKit session when the component mounts and ends it when the component unmounts. Use this hook when you want CallKit to be active for the entire lifetime of a component (e.g., during a call).

Parameters

ParameterTypeDescription
configCallKitConfigConfiguration object containing: - displayName - The name to display in the CallKit UI (e.g., username, call title) - isVideo - Whether the call is video or audio only

Returns

void

Example

import React from 'react'; import { useCallKitService } from '@fishjam-cloud/react-native-client'; function CallScreen({ username }: { username: string }) { // CallKit session will automatically start when this component mounts // and end when it unmounts useCallKitService({ displayName: username, isVideo: true }); return null; }