2

GitHub から最新の ZoomSDK を入手しましたが、まだかなり古く、ドキュメントも SDK と一致していません。この例にもバグがあり、ほとんど正しく動作しない余分なコードがたくさんあります。

ログインせずに ZoomSDK を使用してミーティングに参加した人はいますか?

これが私がこれまでに持っているものです:

let zoom: MobileRTC = MobileRTC.shared()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    let context = MobileRTCSDKInitContext.init()
    context.appGroupId = AppConfig.Constants.AppTitle
    context.domain = AppConfig.Constants.WebDomain
    context.enableLog = true

    zoom.initialize(context)

    let auth: MobileRTCAuthService = zoom.getAuthService()!
    auth.clientKey = AppConfig.Constants.AppKey
    auth.clientSecret = AppConfig.Constants.AppSecret
    auth.delegate = self
    auth.sdkAuth()

    return true
}

public func startMeeting(meetingId: String) {

    let user: MobileRTCMeetingStartParam4WithoutLoginUser = MobileRTCMeetingStartParam4WithoutLoginUser.init()
    user.userType = MobileRTCUserType_APIUser
    user.meetingNumber = meetingId
    user.userID = AppConfig.UserHash.UID
    user.isAppShare = false

    guard let meetingService = zoom.getMeetingService() else { return }
    meetingService.customizeMeetingTitle(AppConfig.Constants.AppTitle)
    meetingService.delegate = self

    window = UIApplication.shared.windows.count != 0 ? UIApplication.shared.windows[0] : nil

    // THIS ACTUALLY CRASHES
    meetingService.joinMeeting(with: [
        kMeetingParam_Username: user.userID,
        kMeetingParam_MeetingNumber: user.meetingNumber! as String,
        kMeetingParam_MeetingPassword: ""
    ])

    // Have also tried, does not crash though:
    //let options = MobileRTCMeetingStartParam.init()
    //options.meetingNumber = meetingId
    //options.participantID = AppConfig.UserHash.UID
    //meetingService.startMeeting(with: param)
}

すべての値に問題はなく、成功した Auth レスポンスも返ってきます。ミーティングを開始しようとしても、Zoom UI を開いたり、他のことをしたりしません。

4

1 に答える 1