Zoomtopia is here. Unlock the transformative power of generative AI, helping you connect, collaborate, and Work Happy with AI Companion.
Register nowEmpowering you to increase productivity, improve team effectiveness, and enhance skills.
Learn moreKeep your Zoom app up to date to access the latest features.
Download Center Download the Zoom appDownload hi-res images and animations to elevate your next Zoom meeting.
Browse Backgrounds Zoom Virtual BackgroundsEmpowering you to increase productivity, improve team effectiveness, and enhance skills.
Zoom AI Companion2024-02-15 10:51 PM
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
What am I missing?
Solved! Go to Solution.
2024-02-17 11:03 AM
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!
2024-02-17 11:03 AM
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!
2024-02-18 09:32 PM
Thank you for your response.
2024-02-19 05:40 AM
Great to know !!