Native configuration (iOS & Android)
The package ships every piece of native code that a library can ship. What is left is per-app (bundle ids, signing, Firebase files, entitlements, activity attributes) and cannot be set from a dependency.
What the package does for you
Never copy CallPipModule, VideosdkRPK or RealtimexVoip into your app, and never register a second CallPipPackage in MainApplication — they would be duplicate classes.
Native file cheat sheet
Replace MyChatApp with your Xcode target / Android package. In Fieldr the names are ios/Fieldr/…, ios/FieldrBroadcast/… and com.softwareco.fieldr.
Android — android/build.gradle
buildscript { dependencies { // …existing classpaths classpath('com.google.gms:google-services:4.4.1') }}Android — android/app/build.gradle
apply plugin: "com.android.application"apply plugin: "org.jetbrains.kotlin.android"apply plugin: "com.facebook.react"apply plugin: "com.google.gms.google-services" // ← addPut google-services.json in android/app/.
Android — android/app/src/main/AndroidManifest.xml
Activity attributes are not merged from libraries, so add these two on your launcher activity:
<activity android:name=".MainActivity" android:supportsPictureInPicture="true" android:resizeableActivity="true" ...>Every permission, service and receiver listed in What the package does for you is merged automatically. Paste host-setup/android/AndroidManifest.snippet.xml only if you disabled Android autolinking for this package.
Optional:
- Full-screen incoming calls: install
@notifee/react-nativeand setandroidFullScreenCalls: true(App entry). Android 14+ grantsUSE_FULL_SCREEN_INTENTautomatically only to calling / alarm apps (Play Console declaration); without it the call shows as a heads-up notification. - Notification icon: a white-on-transparent drawable, e.g.
android/app/src/main/res/drawable/ic_notification.png, passed asconfigurePushNotifications({androidSmallIcon: 'ic_notification'}).
MainActivity.kt and MainApplication.kt need no chat code.
iOS — ios/MyChatApp/Info.plist
From host-setup/ios/snippets/Info.plist.snippet.xml, plus the photo-library string for attachments:
<key>NSCameraUsageDescription</key><string>Camera access is required for video calls.</string><key>NSMicrophoneUsageDescription</key><string>Microphone access is required for audio and video calls.</string><key>NSPhotoLibraryUsageDescription</key><string>Choose photos and videos to send in chat.</string> <!-- Screen share: must match the App Group and the Broadcast extension bundle id --><key>RTCAppGroupIdentifier</key><string>group.com.example.mychatapp</string><key>RTCScreenSharingExtension</key><string>com.example.mychatapp.Broadcast</string> <key>UIBackgroundModes</key><array> <string>audio</string> <!-- call audio in the background --> <string>voip</string> <!-- PushKit calls; camera in PiP on iOS 18+ --> <string>picture-in-picture</string> <!-- call PiP --> <string>remote-notification</string> <!-- background delivery + clear pushes --></array>Optional VoIP keys:
iOS — ios/MyChatApp/MyChatApp.entitlements
From host-setup/ios/snippets/Entitlements.snippet.plist. In Xcode: Signing & Capabilities → Push Notifications, Background Modes, App Groups.
<key>com.apple.security.application-groups</key><array> <string>group.com.example.mychatapp</string></array><key>aps-environment</key><string>development</string> <!-- Xcode switches to production for release / TestFlight -->com.apple.developer.avfoundation.multitasking-camera-access (camera in PiP / Split View on iOS 16–17) is a managed entitlement — request it from Apple first; adding it unapproved breaks signing. iOS 18+ only needs the voip background mode.
iOS — ios/MyChatApp/AppDelegate.swift
React Native Firebase requires FirebaseApp.configure() at the start of launch:
import Firebase // inside application(_:didFinishLaunchingWithOptions:), first line:FirebaseApp.configure()No PushKit, CallKit or bridging-header code is needed — the pod's RealtimexVoip handles it. An app delegate that already implements pushRegistry(_:didReceiveIncomingPushWith:for:completion:) keeps working: the pod sees it and stays off (that app must then report every push to CallKit itself — host-setup/ios/snippets/AppDelegate.pushkit.snippet.swift).
iOS — ios/Podfile
require_relative '../node_modules/react-native-permissions/scripts/setup' setup_permissions([ 'Camera', 'Microphone', 'PhotoLibrary',]) target 'MyChatApp' do config = use_native_modules! use_react_native!(:path => config[:reactNativePath]) # …React Native Firebase pod settings for your setup (Fieldr: $RNFirebaseAsStaticFramework = true)end # Screen share — TOP-LEVEL target, outside the app target.target 'MyChatAppBroadcast' do inherit! :search_paths # not :none — CocoaPods would then link nothing pod 'RealtimexLiveChatBroadcast', :path => '../node_modules/@realtimexsco/live-chat-react-native'endThen cd ios && pod install.
iOS — firebase.json (project root, optional)
The package draws foreground RealtimeX notifications itself. If your app has no UNUserNotificationCenterDelegate, React Native Firebase also presents FCM pushes in the foreground; turn that off to avoid a second banner:
{"react-native": {"messaging_ios_foreground_presentation_options": []}}An app with its own UNUserNotificationCenter delegate should complete remote pushes with [] in willPresent.
Optional patches — patches/ (patch-package)
Native steps that cannot be moved into the package
Upgrading from the AppDelegate PushKit snippet
Earlier versions asked hosts to paste PushKit / CallKit code into the AppDelegate. To move to the pod:
- Delete the
PKPushRegistryDelegateextension,RNCallKeep.setup(...),RNVoipPushNotificationManager.voipRegistration()andimport PushKitfromAppDelegate.swift. - Delete the bridging-header imports for
RNCallKeep/RNVoipPushNotificationManager(and the header with itsSWIFT_OBJC_BRIDGING_HEADERsetting if it is now empty). - Delete
patches/react-native-callkeep+4.3.16.patch. pod install, rebuild.