React-native-webrtc: React native 0.62.0 installation problems.

Created on 27 Mar 2020  路  3Comments  路  Source: react-native-webrtc/react-native-webrtc

Hello i've followed the installation instructions provided for both ios and android but they don't seem to work with RN 0.62.0.

On ios it says that React/RCTBridge.h' file not found.

Must i follow the provided instructions or is autolinking above 0.60 working?

Most helpful comment

Hi, i solved this error after spending two days searching and trying

This error occurs probably on RN61+

  1. Add this line to pod
    pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
    and then pod install
    if you get deployment target error go to XCode in general settings and chose the deployment target 10.0 and go to node_modules/react-native-webrtc.podspec and edit the line
    s.platform = :ios, '10.0'
    to
    s.platform = :ios, '9.0'
  1. Leave the first 4 steps
  2. Add libc.tbd, libc++.tbd, libsqlite3.tbd
  3. Add the permissions to info.plist
<key>NSCameraUsageDescription</key>
<string>Camera Permission</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone Permission</string>

if you get bitcode error do the following

Xcode Project -> Build Settings -> Build Options -> Enable Bitcode : No

Android

As long as its RN61+

add these permissions

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus"/>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

All 3 comments

i have the same error and its so annoying ..

Hi, i solved this error after spending two days searching and trying

This error occurs probably on RN61+

  1. Add this line to pod
    pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
    and then pod install
    if you get deployment target error go to XCode in general settings and chose the deployment target 10.0 and go to node_modules/react-native-webrtc.podspec and edit the line
    s.platform = :ios, '10.0'
    to
    s.platform = :ios, '9.0'
  1. Leave the first 4 steps
  2. Add libc.tbd, libc++.tbd, libsqlite3.tbd
  3. Add the permissions to info.plist
<key>NSCameraUsageDescription</key>
<string>Camera Permission</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone Permission</string>

if you get bitcode error do the following

Xcode Project -> Build Settings -> Build Options -> Enable Bitcode : No

Android

As long as its RN61+

add these permissions

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus"/>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Yes i also managed to install it without the manual linking steps on IOS.

Was this page helpful?
0 / 5 - 0 ratings