ClinicKit Mobile SDK / iOS

iOS App Settings

Settings file

When you use the VSeeClinicCore framework in your app, configure it with your app's settings. Create a class called SampleAppSetting that subclasses ClinicSettings:

import VSeeClinicCore

class SampleAppSetting: ClinicSettings {
    static let shared = SampleAppSetting()
    public var appStoreName = "YOUR_APP_STORE_NAME"
    public var appStoreId = "YOUR_APP_STORE_ID"

    override var networkBaseUrl: String {
        return "YOUR_VSEE_API_BASE_URL"
    }

    override var apiKey: String {
        return "YOUR_VSEE_CLINIC_API_KEY"
    }

    override var vseekitAPIKey: String {
        return "YOUR_VSEEKIT_API_KEY"
    }

    override var vseekitSecretKey: String {
        return "YOUR_VSEEKIT_SECRET_KEY"
    }

    static func registerSetting() {
        ClinicSettings.registerClass(self)
    }
}
SettingTypeDescription
appStoreName, appStoreIdStringThe name and ID of your app in the App Store.
networkBaseUrlStringThe base URL for the framework's network requests: the VSee Clinic API endpoint for your clinic. VSee gives you this value; don't change it unless VSee tells you to.
apiKeyStringThe API key for your app, from your clinic's Developers page. See Generate your API key.
vseekitAPIKeyStringThe API key for VSeeKit, the video call component VSeeClinicCore uses. VSee provides it.
vseekitSecretKeyStringThe secret key for VSeeKit. VSee provides it.

Warning: Your API key and VSeeKit secret identify your app. Don't share them or post them publicly.

Register the settings

  1. In AppDelegate.swift, import the VSeeClinicCore framework:
    import VSeeClinicCore
  2. In application(_:didFinishLaunchingWithOptions:), register your settings by calling registerSetting():
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        SampleAppSetting.registerSetting()
        // Your other app setup code here
        return true
    }

The settings now apply throughout your app.