You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doctor_app_flutter/ios/Runner/AppDelegate.swift

55 lines
2.0 KiB
Swift

import UIKit
import Flutter
import OpenTok
// Created by Mohammad Aljammal & Elham Rababah on 24/06/20.
// Copyright © 2020 Cloud. All rights reserved.
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate ,ICallProtocol {
var result: FlutterResult?
func sessionDone(res:Any) {
self.result?(res)
}
func sessionNotResponded(res:Any) {
self.result?(res)
}
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
private func openVideoChat(result: FlutterResult,kApiKey: String, kSessionId: String,kToken: String,appLang:String, vC_ID: Int,tokenID:String,generalId:String,doctorId:Int,baseUrl:String) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let identifier = "ViewControllerNav"
let navVC = storyboard.instantiateViewController(withIdentifier: identifier) as! UINavigationController
let videoVC = navVC.viewControllers.first as! VideoCallViewController
videoVC.kApiKey=kApiKey
videoVC.kSessionId=kSessionId
videoVC.kToken=kToken
videoVC.VC_ID = vC_ID
videoVC.generalid = generalId
videoVC.TokenID = tokenID
videoVC.DoctorId = doctorId
videoVC.baseUrl = baseUrl
videoVC.callBack = self
videoVC.navigationController?.setNavigationBarHidden(true, animated: false)
navVC.modalPresentationStyle = .fullScreen
window.rootViewController?.present(navVC, animated: true, completion: nil)
}
}