Skip to main content

Booking

Booking ViewController

Once we initialized the SDK and authenticated the user, we can retrieve the MeetingDoctors UI using the following method:

public class func bookingViewController(completion: @escaping (Swift.Result<UIViewController, Error>) -> Void)

So we can invoke the booking by adding the following call:

CAUTION

Errors returned

  • Framework not initializated or user not authenticated
MeetingDoctorsError.illegalStateException(reason: .frameworkInitializationFailed))
  • Feature not enabled for that company
MeetingDoctorsError.booking(reason: .notEnabled))
[...]
MeetingDoctors.bookingViewController { [weak self] result in
switch result {
case let .success(value):
// do some stuff with the viewcontroller
case let .failure(error):
// do some stuff with the error
}
}
[...]