react-native-zoom-ios
v1.0.0
Published
React Native bridge for Zoom SDK (iOS)
Downloads
17
Readme
react-native-afrzoom
Native Bindings for the Zoom.US Library
react-native link react-native-afrzoom
in Xcode, go to your main project Build Phases -> Link Binary With Libraries and add the following: a) DropboxSDK.framework b) ZoomSDK.framework c) Foundation.framework d) CoreGraphic.framework e) libz.1.2.5.tbd f) libsqlite3.tbd g) libstdc++.6.tbd
in Xcode, go to your main project Build Phases -> Copy Bundle Resources and add the following: a) ZoomSDKResources.bundle
in Xcode go to your AppDelegate and add the following code after the import for "AppDelegate.h" a) #import <ZoomSDK/ZoomSDK.h>
then add the following code after the last import
#define kZoomSDKAppKey @"nWRVRQVBB5NL992aSA2T1CEjPSoALdkwDhQb" #define kZoomSDKAppSecret @"8uV38aLgWpo45pIE7VaOUAT30SLRYbqSpnKi" #define kZoomSDKDomain @"zoom.us"
then add the following code beetween the define code above and the @implementation code
@interface AppDelegate ()<ZoomSDKAuthDelegate, UIAlertViewDelegate>
@end
and finally add the following code at the end of the file (before the @end)
#pragma mark - Auth Delegate
(void)sdkAuth { ZoomSDKAuthService *authService = [[ZoomSDK sharedSDK] getAuthService]; if (authService) { authService.delegate = self;
authService.clientKey = kZoomSDKAppKey; authService.clientSecret = kZoomSDKAppSecret;
[authService sdkAuth]; } }
(void)onZoomSDKAuthReturn:(ZoomSDKAuthError)returnValue { NSLog(@"onZoomSDKAuthReturn %d", returnValue);
if (returnValue != ZoomSDKAuthError_Success) { NSString *message = [NSString stringWithFormat:@"SDK authentication failed, errod code: %zd", returnValue ]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Retry", nil]; [alert show]; } }
(void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex != alertView.cancelButtonIndex) { [self performSelector:@selector(sdkAuth) withObject:nil afterDelay:1.f]; } }
in your RN project simply just import react-native-afrzoom like this:
import * as AFRZoom from 'react-native-afrzoom';
and then call the joinMeeting function whereever you need it like this:
AFRZoom.joinMeeting({ meetingNumber:"462119746", displayName:"reactNative", password:"" })