- set up the Android or iOS development environment
react-native-cliis installed globally
- check you are in
react-native-sdk-2.x/sample-appdirectory npm install- in
/sample-app/androidcreate a filelocal.propertiesand add the linesdk.dir = /Users/USERNAME/Library/Android/sdk - in
/sample-appcreate a fileapp-config.jsand copy the contents ofapp-config-example.jsreplacing the placeholder values with your own key and secret* - run
sudo react-native run-android - ensure that you have an Android device plugged in and USB debugging enabled
- grant permission for USB installation when prompted
-
check you are in
react-native-sdk-2.x/sample-appdirectory -
npm install -
navigate to
/sample-app/iosand openReactNativeWebRTC.xcodeprojin Xcode -
in
/sample-appcreate a fileapp-config.jsand copy the contents ofapp-config-example.jsreplacing the placeholder values with your own key and secret* -
Step 1: Add
temasys-react-native-webrtclibrary- in the
Librariespanel, if there is an existingRCTWebRTV.xcodeproj, delete it - right click
Librariesand clickAdd Files to [project] - from project root folder, navigate to
node_modules/temasys-react-native-webrtc/ios/RCTWebRTV.xcodeprojthenAdd
- in the
-
Step 2: Add Library Search Path
- click on the main project file in the left panel - the top most file named ReactNativeWebRTC
- select
Build settings, scroll down to findSearch Paths - edit BOTH
Framework Search PathsandLibrary Search Pathsentries - add path on BOTH sections with:
$(SRCROOT)/../node_modules/temasys-react-native-webrtc/ioswithrecursive
-
Step 3: Add
libRCTWebRTC.alibrary- click
Build Phasestab and openLink Binary With Libraries - enter
libRCTWebRTC.ain the search bar and clickAdd
-
check that the following libraries have been added
- AVFoundation.framework
- AudioToolbox.framework
- CoreGraphics.framework
- GLKit.framework
- CoreAudio.framework
- CoreVideo.framework
- VideoToolbox.framework
- libc.tbd
- libc++.tbd
- libsqlite3.tbd
-
if they are not, add them following the same steps as
libRCTWebRTC.a -
check that
WebRTC.frameworkis linked
- under
Linkingcheck thatDead Code Strippingand underBuild OptionsthatEnable Bitcodeare set toNo
- click
-
Step 4: Permissions
- navigate to
<ProjectFolder>/ios/<ProjectName>/Info.plist - check that
Camera UsageandMicrophone Usageare set, otherwise edit to add the values
- navigate to
-
Step 5:
- check that you have an iOS device set up
- click
buildto build and run the app
*Obtain your key from Temasys Developer's Console




