React-native meetings for ZoomUs video conference calls android & iOS SDK's
$ npm install react-native-zoom-meetings --save
Shortcut
Runnpm i --save react-native-zoom-meetings
For iOS:
chmod +x ./node_modules/react-native-zoom-meetings/bin/import_dev_sdk.sh
./node_modules/react-native-zoom-meetings/bin/import_dev_sdk.sh
cd ios
pod install
Follow Extra steps for iOS
Currently when running import_dev_sdk.sh imports are changed automatically , this will be obselete if zoom changes sdk fie structure(#incorrect-header-imports)
For Android:
chmod +x ./node_modules/react-native-zoom-meetings/bin/import_aars.sh
./node_modules/react-native-zoom-meetings/bin/import_aars.sh
Follow Extra steps for Android
For a more detailed guide read on.
Import iOS Development SDK
run in project root
$ chmod +x ./node_modules/react-native-zoom-meetings/bin/import_dev_sdk.sh
$ ./node_modules/react-native-zoom-meetings/bin/import_dev_sdk.sh
or download the development SDK manually from here or from the latest releases page https://github.com/zoom/zoom-sdk-ios/releases and place all contents of lib folder in node_modules/react-native-zoom-meetings/ios/libs
Import iOS Production SDK
run in project root
$ chmod +x ./node_modules/react-native-zoom-meetings/bin/import_prod_sdk.sh
$ ./node_modules/react-native-zoom-meetings/bin/import_prod_sdk.sh
or download the production SDK manually from here or from the latest releases page https://github.com/zoom/zoom-sdk-ios/releases and place all contents of lib folder in node_modules/react-native-zoom-meetings/ios/libs
Production vs Development SDK's
There is two SDK's provided by zoom for iOS, development & production sdk's - **you will get a build fail if you run production sdk on a simulator and a compilation error when archiving the app for release if using the development sdk!**Check out this https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/getting-started/integration#5-deployment and make sure you have the correct SDK for your build.
You can download the development sdk from here https://github.com/zoom/zoom-sdk-ios/releases/download/v4.6.15084.0206/ios-mobilertc-all-4.6.15084.0206-n.zip on the latest releases page https://github.com/zoom/zoom-sdk-ios/releases.
Check out the description on Zoom's github page https://github.com/zoom/zoom-sdk-ios.
The issue when releasing to app store with unsupported architecture is because the development SDK works for both simulator and real device. You can work around this issue by following this answer to add script in Build Phases that filters out unsupported architectures: https://stackoverflow.com/questions/30547283/submit-to-app-store-issues-unsupported-architecture-x86. You may want to modify the script to be more specific, i.e. replace '*.framework' with 'MobileRTC.framework'
Afterwards you will have to rename the header imports in the whole SDK removing the leading MobileRTC/ from the header imports. see Incorrect header imports
Import Android aar's
run in project root
$ chmod +x ./node_modules/react-native-zoom-meetings/bin/import_aars.sh
$ ./node_modules/react-native-zoom-meetings/bin/import_aars.sh
or download the aar's manually from here and take out the aar files from /mobilertc-android-studio/mobilertc && /mobilertc-android-studio/commonlib and place both (commonlib.aar && mobilertc.aar) in node_modules/react-native-zoom-meetings/ios/libs
Make sure they appear in their platform respective locations as follows:
iOS: node_modules/react-native-zoom-meetings/ios/libs
Android: node_modules/react-native-zoom-meetings/android/libs
you can continue to linking.
On react-native versions 60+ for ios just cd ios/ and pod install - make sure you already have the right SDK in the libs folder before running pod install
for lower react-native versions run $ react-native link react-native-zoom-meetings
Since Zoom SDK *.aar libraries are not globally distributed
it is also required to manually go to your project's android/build.gradle and under allprojects.repositories add the following:
allprojects {
repositories {
flatDir {
dirs "$rootDir/../node_modules/react-native-zoom-meetings/android/libs"
}
...
}
...
}If you have problem with multiDex go to your project's android/app/build.gradle and under android.defaultSettings add the following:
android {
defaultConfig {
multiDexEnabled true
...
}
...
}In order to use the latest SDK from zoom.us currently v4.6.21666.0429 you will have to set your api level to 29 and use build tools 29+ and min sdk to 21.
So make sure your settings are as follows:
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
}
and that you have build tools 29 installed.
- In XCode, in your main project go to
Build Settingstab:
- search for
Enable Bitcodeand make sure it is set toNO
- In XCode, in your main project go to
Infotab and in the following keys enter the appropriate description:
NSCameraUsageDescriptionNSMicrophoneUsageDescriptionNSPhotoLibraryUsageDescriptionNSBluetoothPeripheralUsageDescription
Currently when running import_dev_sdk.sh imports are changed automatically , this will be obselete if zoom changes sdk fie structure
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-zoom-meetingsand addRNZoomBridge.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNZoomBridge.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)< - In XCode, in your main project go to
Generaltab, expandLinked Frameworks and Librariesand add the following libraries:libsqlite3.tbdlibc++.tbdlibz.1.2.5.tbdCoreBluetoothVideoToolboxReplayKit
- In XCode, in your main project go to
Generaltab, expandLinked Frameworks and Librariesand addMobileRTC.framework:- choose
Add other... - navigate to
../node_modules/react-native-zoom-meetings/ios/libs - choose
MobileRTC.framework
- choose
- In XCode, in your main project go to
Generaltab, expandEmbedded Binariesand addMobileRTC.frameworkfrom the list - should be atFrameworks. - In XCode, in your main project go to
Build Phasestab, expandCopy Bundle Resourcesand addMobileRTCResources.bundle:- choose
Add other... - navigate to
../node_modules/react-native-zoom-meetings/ios/libs - choose
MobileRTCResources.bundle - choose
Create folder referencesand uncheckCopy files if neededNote: if you do not haveCopy Bundle Resourcesyou can add it by clicking on top-left+sign
- choose
- In XCode, in your main project go to
Build Settingstab:- search for
Framework Search Pathsand add$(SRCROOT)/../node_modules/react-native-zoom-meetings/ios/libswithnon-recursive
- search for
- Follow Extra steps for iOS
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.appgolaz.reactnative.RNZoomBridgePackage;to the imports at the top of the file - Add
new RNZoomBridgePackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-zoom-meetings' project(':react-native-zoom-meetings').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zoom-meetings/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:implementation project(':react-native-zoom-meetings') - Follow Extra steps for Android
import ZoomBridge from 'react-native-zoom-meetings';
await ZoomBridge.initialize(
config.zoom.appKey,
config.zoom.appSecret,
config.zoom.domain
);
// Start Meeting
await ZoomBridge.startMeeting(
displayName,
meetingNo,
userId, // can be 'null'?
userType, // for pro user use 2
zoomAccessToken, // zak token
zoomToken // can be 'null'?
// NOTE: userId, userType, zoomToken should be taken from user hosting this meeting (not sure why it is required)
// But it works with putting only zoomAccessToken
);
// OR Join Meeting
await ZoomBridge.joinMeeting(
displayName,
meetingNo
);
const ZOOM_SUCCESS_TEXT = 'Login succesful'
async signInToZoom(email,pwd) {
try {
const signIn = await ZoomBridge.loginWithEmail(
email,
pwd,
true); //remember me//
if(signIn === ZOOM_SUCCESS_TEXT)
return true
else
return false;
} catch (e) {
return false;
}
}
}
//First login before starting meeting//
const meetingDets = await ZoomBridge.startLoginMeeting(
'Display Name'
);
console.log(meetingDets.pwd + ' ' + meetingDets.id);
