- set up the Android or iOS development environment
react-native-cli
is installed globally
- check you are in
react-native-sdk-2.x/sample-app
directory npm install
- in
/sample-app/android
create a filelocal.properties
and add the linesdk.dir = /Users/USERNAME/Library/Android/sdk
- in
/sample-app
create a fileapp-config.js
and copy the contents ofapp-config-example.js
replacing 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-app
directory -
npm install
-
navigate to
/sample-app/ios
and openReactNativeWebRTC.xcodeproj
in Xcode -
in
/sample-app
create a fileapp-config.js
and copy the contents ofapp-config-example.js
replacing the placeholder values with your own key and secret* -
Step 1: Add
temasys-react-native-webrtc
library- in the
Libraries
panel, if there is an existingRCTWebRTV.xcodeproj
, delete it - right click
Libraries
and clickAdd Files to [project]
- from project root folder, navigate to
node_modules/temasys-react-native-webrtc/ios/RCTWebRTV.xcodeproj
thenAdd
- 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 Paths
andLibrary Search Paths
entries - add path on BOTH sections with:
$(SRCROOT)/../node_modules/temasys-react-native-webrtc/ios
withrecursive
-
Step 3: Add
libRCTWebRTC.a
library- click
Build Phases
tab and openLink Binary With Libraries
- enter
libRCTWebRTC.a
in 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.framework
is linked
- under
Linking
check thatDead Code Stripping
and underBuild Options
thatEnable Bitcode
are set toNo
- click
-
Step 4: Permissions
- navigate to
<ProjectFolder>/ios/<ProjectName>/Info.plist
- check that
Camera Usage
andMicrophone Usage
are set, otherwise edit to add the values
- navigate to
-
Step 5:
- check that you have an iOS device set up
- click
build
to build and run the app
*Obtain your key from Temasys Developer's Console