Skip to main content

Installation

Description

In this section, you can find all the information related to the integration of:

Consultation ListChatMy HealthVideocall

Requirements

Please make sure you are using the last Xcode compatible with our SDK

SwiftXcodeMeetingDoctorsiOSStatus
5.716.48.x.x+13.0+Supported
6.016.49.x.x+13.0+Supported

In order to check the last updates please check our Release Notes.

Swift Package Manager

To install the MeetingDoctors library you must first include MeetingDoctors package.

Steps:

  • Open Xcode then select Project > Package Dependencies > "+"
  • Add repo url: https://github.com/Meeting-Doctors/meetingdoctors-sdk-spm

Access permissions

The MeetingDoctors SDK requires explicit user authorization to access system resources such as the camera, photo library, and microphone. Failure to declare the appropriate permission keys in the app's Info.plist will result in runtime exceptions.

info

Access to the device camera or photo gallery always requires explicit authorization from the user. For more details, see Apple’s documentation on requesting media capture permissions: Apple Documentation

Your application must provide clear and meaningful explanations for why these resources are required by including the following usage description keys in the Info.plist.
These messages are presented to the user during the system permission prompt.

caution

Attempting to access the camera, microphone, local network, or photo library without providing the corresponding usage description in the Info.plist will result in an exception.

Required Info.plist Keys

<key>NSCameraUsageDescription</key>
<string>#NSCameraUsageDescription</string>

<key>NSMicrophoneUsageDescription</key>
<string>#NSMicrophoneUsageDescription</string>

<key>NSPhotoLibraryUsageDescription</key>
<string>#NSPhotoLibraryUsageDescription</string>

Optional Info.plist Keys

The following key is optional and only required if your app uses features that involve local network communication:

<key>NSLocalNetworkUsageDescription</key>
<string>#NSLocalNetworkUsageDescription</string>
KeyRequiedPurpose
NSCameraUsageDescriptionYesAllows access to the device camera to capture images or start a camera session.
NSMicrophoneUsageDescriptionYesRequired for audio capture during calls or voice interactions.
NSPhotoLibraryUsageDescriptionYesEnables selecting or attaching photos from the user’s gallery.
NSLocalNetworkUsageDescriptionOptionalNeeded only if the app communicates over the local network.

Background Modes (Signing & Capabilities)

In order to support real-time communication, push notifications and certain background behaviors, the app must be configured with the appropriate Background Modes in Xcode.

To configure them:

  1. Open your project in Xcode.
  2. Select your app target.
  3. Go to the Signing & Capabilities tab.
  4. Click + Capability and add Background Modes.
  5. Enable the following options:
OptionRequiredPurpose
Audio, AirPlay, and Picture in PictureRecommendedAllows ongoing audio/video consultations to continue correctly when the app goes to the background.
Background fetchOptionalAllows the app to periodically fetch and refresh data in the background (e.g. updating pending consultations or messages).
Background processingOptionalEnables longer-running background tasks when the system grants time for maintenance or synchronization.
Remote notificationsRequiredAllows the app to receive and handle push notifications while in the background, including updating UI state before the user opens the app.
info

Only enable the background modes that are actually used by your application. Enabling unnecessary modes may lead to App Review questions or rejection.

Entitlements

In addition to configuring the required Background Modes in Xcode, the corresponding entitlements must also be enabled in the Apple Developer portal.
These entitlements allow the application to receive and process push notifications at the system level.

Enabling Push Notification Entitlements

  1. Sign in to the Apple Developer Portal.
  2. Navigate to Certificates, Identifiers & Profiles.
  3. Select your App ID.
  4. Under Capabilities, enable the following entitlement:
OptionRequiredPurpose
Push NotificationsYesEnables APNs registration and reception of remote notifications, including consultation updates and system alerts.
info

If the Push Notifications entitlement is not enabled, the app will fail to register with APNs and will not receive remote notifications — even if Background Modes are correctly configured in Xcode.

Integration

To use the library is necessary to import it in our AppDelegate:

import MeetingDoctorsSDK

Next, once the system notifies that your application is active, you should initializate the framework using the following method:

parameters
  • MeetingDoctors.Configuration
    • apikey
      • The API Key for the environment.
    • environment (default .production)
      • If set to .production, the SDK interacts with the production environment.
      • If set to .staging, the SDK will communicate with the staging environment.
public static func initialize(configuration: MeetingDoctors.Configuration) async throws -> UUID

Implementation example

func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
[...]
let configuration = MeetingDoctors.Configuration(apikey: apikey)
let uuid = try await MeetingDoctors.initialize(configuration: configuration)
[...]
}