onMobileRTCLoginReturn not being called


This is how I setup my SDK

class AppDelegate: UIResponder, UIApplicationDelegate, MobileRTCAuthDelegate {

func setupSDK(sdkKey: String, sdkSecret: String) {
let context = MobileRTCSDKInitContext()
context.domain = “zoom.us
context.enableLog = true

    let sdkInitializedSuccessfully = MobileRTC.shared().initialize(context)
    if sdkInitializedSuccessfully == true, let authorizationService = MobileRTC.shared().getAuthService() {
        authorizationService.clientKey = sdkKey
        authorizationService.clientSecret = sdkSecret
        authorizationService.jwtToken = "xxxxxxx"
        authorizationService.delegate = self

This is my callback method in AppDelegate.

func onMobileRTCLoginReturn(_ returnValue: Int) {
    switch returnValue {
    case 0:
        print("Successfully logged in")

        // This alerts the ViewController that login was successful.            NotificationCenter.default.post(name: Notification.Name("userLoggedIn"), object: nil)
    case 1002:
        print("Password incorrect")
        print("Could not log in. Error code: \(returnValue)")

This function called when user login

>  func logIn(email: String, password: String) {
>         if let authorizationService = MobileRTC.shared().getAuthService() {
>             authorizationService.login(withEmail: email, password: password, rememberMe: false)
>         }
>     }

Can you please check this and let me know. Is it possible that my JWT token is expired that’s why login method is not called?

Which iOS Client SDK version?
I’m using 5.2.42037.1112 version

Smartphone (please complete the following information):

  • Device: [e.g. iPhone 12]
  • OS: [e.g. iOS 14.4]

Hey @officialmakkar,

Thanks for using the dev forum!

The issue is that you are supplying both a client key/secret and a JWT. The SDK only needs a JWT, please remove those two lines.