getMeetingService=nil

Description


Why is ZoomSDK.shared().getAuthService().isAuthorized() = false?
Why is getMeetingService=nil?
Please help me!
Please help me!

Which version?
zoomsdk版本4.4.x , xcode 9.4.1 ,swift 4.2

You need do auth first, and do join meeting action when you have already receive auth success callback. If you haven’t auth success, all these will return nil.

let ret = ZoomSDK.shared().getAuthService().sdkAuth(kZoomSDKKey, appSecret: kZoomSDKSecret)

I’ve verified the ZoomError (rawValue: 3) that he returned, and your demo returned ZoomSDKError (rawValue: 0), We used the same key and Secret in 2 projects,and I don’t quite understand what went wrong.

Hi 897132128,

Thanks for the reply. The error code 3 means “Service failed”, it seems like the SDK has not been initialized successfully. In order to make our SDK work properly, you need to follow the steps in the following order:

SDK init -> SDK Auth -> SDK Auth callback return success -> Get meeting service and start using Zoom

You can refer to the implementation in our demo:https://github.com/zoom/zoom-sdk-macos/blob/3444a6e5755aff1b7c4d4bdb94c8486fceb5eb8e/ZoomSDKSample/ZoomSDKSample/Init/ZMSDKInitHelper.m

Hope this helps. Thanks!

I tried to follow the steps, but still can’t return successfully. I once suspected that it was my key and Secret. I have delayed this problem for more than a week. I sent a demo source below, hoping to give some modifications and guidance, because I really don’t know how to deal with it for the time being. This problem. Thank you very much!
demo

This problem has been wasting me for more than a week. I need help very much. Thank you for your patience and help!I just hope that he can join the meeting。

You need call ‘- (void)initSDK:(BOOL)customizedFlag’ first before firstly call ‘+ (ZoomSDK*)sharedSDK’. The call flow in your code is incorrect, please refer to the call folw in zoom sdk sample.

let sdk = ZoomSDK.shared()
    sdk?.initSDK(false)
    sdk?.zoomDomain = kZoomSDKDomain
    let authService = sdk?.getAuthService()
    if authService != nil {
        authService?.delegate = self
        let ret = ZoomSDK.shared().getAuthService().sdkAuth(kZoomSDKKey, appSecret: kZoomSDKSecret)
        debugPrint("\(ret)")
    }

I have called this method in the first place, but it still has no use.-> sdk?.initSDK(false)
demo

let sdk = ZoomSDK.shared()
    sdk?.initSDK(false)
    sdk?.zoomDomain = kZoomSDKDomain
    let authService = sdk?.getAuthService()
    if authService != nil {
        authService?.delegate = self
        let ret = ZoomSDK.shared().getAuthService().sdkAuth(kZoomSDKKey, appSecret: kZoomSDKSecret)
        debugPrint("\(ret)")
    }

I have called this method in the first place, but it still has no use.-> sdk?.initSDK(false)
demo

help me!
help me!
This problem is very difficult for me.:sob::sob::sob::sob:

Call ‘- (void)setZoomDomain:(NSString*)domain’, but not the property zoomDomain.

SDK init -> SDK Auth -> SDK Auth callback return success -> Get meeting service and start using Zoom
I tried to modify it innumerable times, it is still ‘servie failed’, here is my source code, please help me find it.https://github.com/zhanghengios/zoomos


I deliberately write a demo with oc, so I can use SetZoomDomain instead of zoomDmain but it is still ‘service failed’. I doubt if it is my key and secret problem, because I don’t have any other keys and secret. In the end, why is the above my demo source!

I have said before, your call flow is wrong. Below is the recommend change.

  • (void) sdkAuto {
    [[ZoomSDK sharedSDK] initSDK:NO];
    ZoomSDK *sdk = [ZoomSDK sharedSDK];
    [sdk setZoomDomain:kZoomSDKDomain];

    }


I tried. But he didn’t change anything., I hope you can try to modify my demo run under.
https://github.com/zhanghengios/zoomos

I tried. But he didn’t change anything., I hope you can try to modify my demo run under.

I have downloaded you project and check your project. The root case is your project setting is incorrect.

Please refer to the project setting of zoom sdk sample. The libcrypto.1.0.0.dylib and libssl.1.0.0.dylib must be added in ‘Link Binary With Libraryies’ and other libs in ZoomSDK folder must be added in ‘Copy Files’ and the destination must be ‘Frameworks’.

I have made these change on your demo app, now the auth return is ZoomSDKError_Success.

3 Likes

Spent a lot of time, finally solved, thank you very much.

2 Likes

Glad issue is solved. Thanks!

@Derain_Yuan and @tommy We’re in a similar desperate situation. We spend countless hours on this and still don’t have a working code. The we found the post and followed the suggestions but still no luck. Please have a look, what are we missing here? Why do we get ZoomSDKError_WrongUsage?

 #import "ViewController.h"

#define kZoomSDKDomain      @"zoom.us"
#define kZoomSDKKey         @"..."
#define kZoomSDKSecret      @"..."
#define kSDKUserName        @"Bobin"

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    BOOL useCustomizedUI = NO;
    ZoomSDK* sdk = [ZoomSDK sharedSDK];
    
    NSString* domain = kZoomSDKDomain;
    NSString* key = kZoomSDKKey;
    NSString* secret = kZoomSDKSecret;
    
    [sdk initSDK:useCustomizedUI];
    [sdk setZoomDomain:domain];
    
    ZoomSDKError ret = [[sdk getAuthService] sdkAuth:key appSecret:secret];
}

- (IBAction)joinClicked:(id)sender {
    ZoomSDKMeetingService* meetingService = [[ZoomSDK sharedSDK] getMeetingService];
    
    NSString* userName = kSDKUserName;
    NSString* pwd = @"...";
    NSString* meetingNumber = @"...";
    
    ZoomSDKError ret = [meetingService joinMeeting:ZoomSDKUserType_APIUser
                                 toke4enfrocelogin:nil
                                      webinarToken:nil
                                     participantId:nil
                                     meetingNumber:meetingNumber
                                       displayName:userName
                                          password:pwd
                                     isDirectShare:NO
                                         sharedApp:0
                                        isVideoOff:NO
                                        isAuidoOff:NO
                                          vanityID:nil];
}

- (IBAction)unmuteClicked:(id)sender {
    ZoomSDKMeetingService* meetingService = [[ZoomSDK sharedSDK] getMeetingService];
    
    ZoomSDKError* result = [[meetingService getMeetingActionController] actionMeetingWithCmd:ActionMeetingCmd_UnMuteAudio userID:0 onScreen:ScreenType_First];
    // result is ZoomSDKError_WrongUsage :-(((
}
@end

Screenshots
Another issue we have:

Exactly the same code works fine in your Sample App. So I’m wondering what’s the missing piece here.

func onUserAudioStatusChange(_ userAudioStatusArray: [Any]!) {

    for userAudioStatus in userAudioStatusArray as! [ZoomSDKUserAudioStauts] {
        let userID: UInt32 = userAudioStatus.getUserID()

        if (self.meetingActionController == nil) {
            self.meetingActionController = ZoomSDK.shared()?.getMeetingService()?.getMeetingActionController()
        }
        let userInfo: ZoomSDKUserInfo? = self.meetingActionController!.getUserByUserID(userID)
                
        if(userInfo != nil && userInfo!.isMySelf())
        {
            self.mySelfUserInfo = userInfo!
        }
    }

}

Macbook:

  • Device: MacBook Pro (Retina, 15-inch, Mid 2015)
  • OS: macOS Catalina 10.15.2 (19C57)
  • Xcode: Version 10.2.1 (10E1001)