cancel
Showing results for 
Search instead for 
Did you mean: 
Important updates from Zoom Support:
  • Effective immediately, customers with subscription plans greater than $10 USD/month may receive live chat support. Sign in and visit our contact page to view your support options.

  • Starting February 1, 2025, Zoom Phone customers must add their phone numbers to an approved 10DLC campaign in order to keep using SMS/MMS capabilities on their numbers.

Zoom meeting ios SDK is not working while bridging from react native

Prabup
Explorer
Explorer

In obj C, I have added a UIViewcontroller from which zoom sdk will be intiated in viewDidLoad method as below,

// ZoomViewController.m

@implementation ZoomViewController
- (void)viewDidLoad {
  [super viewDidLoad];
  [self setupSDK:@"MY_APP_JWT_TOKEN"];
}
- (void)setupSDK:(NSString *)jwtToken {
  MobileRTCSDKInitContext *context = [[MobileRTCSDKInitContext alloc] init];
  context.domain = @"zoom.us";
  context.enableLog = YES;
  BOOL sdkInitSuc = [[MobileRTC sharedRTC] initialize:context];
  if (sdkInitSuc) {
    MobileRTCAuthService *authService = [[MobileRTC sharedRTC] getAuthService];
    if (authService) {
      authService.delegate = self;
      authService.jwtToken = jwtToken;
      [authService sdkAuth];
    }
  }
}


- (void)onMeetingStateChange:(MobileRTCMeetingState)state {
  NSLog(@"Meeting state: %ld", (long)state);
}

- (void)onMeetingReady:(MobileRTCMeetingState)state {
  NSLog(@"Meeting ready: %ld", (long)state);
}


-(void)startzoommeeting {
  MobileRTCMeetingService *meetingService = [[MobileRTC sharedRTC] getMeetingService];
  if (meetingService) {
    meetingService.delegate = self;
    [meetingService customizeMeetingTitle:@"Sample meeting title"];
    MobileRTCMeetingStartParam4WithoutLoginUser *user = [[MobileRTCMeetingStartParam4WithoutLoginUser alloc] init];
    user.userType = MobileRTCUserType_APIUser;
    user.meetingNumber = kMeetingNumber;
    user.userName = KuserName;
    user.isAppShare = NO;
    user.zak = @"MY_APP_JWT_TOKEN";
    [meetingService startMeetingWithStartParam: user];
  };
}
#pragma mark - MobileRTCAuthDelegate
- (void)onMobileRTCAuthReturn:(MobileRTCAuthError)returnValue {
    switch (returnValue) {
        case MobileRTCAuthError_Success:

[self startzoommeeting]; //  After the SDK initiation success 
            break;
      case MobileRTCAuthError_Unknown:
            NSLog(@"Client JWT Token authentication is invalid.");
            break;
        default:
            NSLog(@"SDK Authorization failed with MobileRTCAuthError: %u", returnValue);
    }
}

 

 

// ZoomViewController.h

#import <UIKit/UIKit.h>
#import <MobileRTC/MobileRTC.h>
#import <MobileCoreServices/MobileCoreServices.h>

@interface ViewController : UIViewController <MobileRTCMeetingServiceDelegate, MobileRTCAuthDelegate>
@end

 

// ZoomViewControllerBridge.m -- bridge_file


RCT_EXPORT_METHOD(presentZoomView) {
  dispatch_async(dispatch_get_main_queue(), ^{
    UIWindow *window = [[[UIApplication sharedApplication] windows] firstObject];
          if (window) {
            UIViewController *rootViewController = window.rootViewController;
            if ([rootViewController isKindOfClass:[UINavigationController class]]) {
                UINavigationController *navController = (UINavigationController *)rootViewController;
                ZoomViewController *zoomVC = [[ZoomViewController alloc] init];
                [navController pushViewController:zoomVC animated:YES];
          }
     });
}

 

In React Native , I'm calling the native code through bridge as below

 

import { NativeModules } from 'react-native';
const { ZoomViewControllerBridge } = NativeModules;
ZoomViewControllerBridge.presentZoomView();
 
The Zoom SDK initialization was successful, and the following line of code (meetingService startMeetingWithStartParam: user) was executed; however, nothing happens after that. When I try the same flow in native code, the delegate method (onMeetingStateChange) is called, but it's not getting called through the bridge.

 

What am I missing?

1 ACCEPTED SOLUTION

Humashankar
Community Champion | Customer
Community Champion | Customer

Hi - I hope that you are Doing good !!

Check the console output and any error messages you try to use the Zoom Meeting iOS SDK in your React Native project

Thank you very much and have a fantastic day!

Huma

View solution in original post

3 REPLIES 3

Humashankar
Community Champion | Customer
Community Champion | Customer

Hi - I hope that you are Doing good !!

Check the console output and any error messages you try to use the Zoom Meeting iOS SDK in your React Native project

Thank you very much and have a fantastic day!

Huma

Prabup
Explorer
Explorer

Thank you for your response.

Humashankar
Community Champion | Customer
Community Champion | Customer

Great to know !!

Huma