Skip to main content

iOS Setup

Follow below steps if you are setting up for iOS

Step 1: Install incall manager

Install react-native-incallmanager
$ yarn add @videosdk.live/react-native-incallmanager

Step 2: IMPORTANT: Make sure you are using CocoaPods 1.10 or higher.

To update CocoaPods you simply install the gem again

Update cocoapods
$[sudo] gem install cocoapods

Step 3: Manual linking (if react-native-incall-manager is not linked automatically)

  • Drag node_modules/@videosdk.live/react-native-incall-manager/ios/RNInCallManager.xcodeproj under your_xcode_project/Libraries

  • Select your_xcode_project --> Build Phases --> Link Binary With Libraries

  • Drag Libraries/RNInCallManager.xcodeproj/Products/libRNInCallManager.a to Link Binary With Libraries

    2.3 Select your_xcode_project --> Build Settings In Header Search Paths, add $(SRCROOT)/../node_modules/@videosdk.live/react-native-incall-manager/ios/RNInCallManager

Step 4: Change path of react-native-webrtc

Change path of react-native-webrtc
pod ‘react-native-webrtc’, :path => ‘../node_modules/@videosdk.live/react-native-webrtc’

Step 5: Change your platform version

You have change platform field of podfile to 12.0 or above it, as react-native-webrtc doesn’t support iOS < 12 platform :ios, ‘12.0’

Step 6: Install pods

After updating the version, you have to install pods.

Install pods
Pod install

Step 7: Declare permissions in Info.plist :

Add following lines to info.plist (project folder/ios/projectname/info.plist):

Update permissions
	<key>NSCameraUsageDescription</key>
<string>Camera permission description</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone permission description</string>

Final Steps

Import Example

The easiest way to start is import @videosdk.live/react-native-sdk.

meeting.js
import {
register,
useMeeting,
MeetingConsumer,
MeetingProvider,
useParticipant,
RTCView,
MediaStream,
} from "@videosdk.live/react-native-sdk";

Register services at start of meeting

Call register event from the index.js file to initialize services such as incall manager and foreground services.

index.js
// Import the library
import { register } from '@videosdk.live/react-native-sdk';
import { AppRegistry } from 'react-native';
import { name as appName } from './app.json';
import App from './src/App.js';

// Register the service
register();
AppRegistry.registerComponent(appName, () => App);

Got a Question? Ask us on discord