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)
}
}
| Setting | Type | Description |
|---|---|---|
appStoreName, appStoreId | String | The name and ID of your app in the App Store. |
networkBaseUrl | String | The 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. |
apiKey | String | The API key for your app, from your clinic's Developers page. See Generate your API key. |
vseekitAPIKey | String | The API key for VSeeKit, the video call component VSeeClinicCore uses. VSee provides it. |
vseekitSecretKey | String | The 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
- In
AppDelegate.swift, import theVSeeClinicCoreframework:import VSeeClinicCore - In
application(_:didFinishLaunchingWithOptions:), register your settings by callingregisterSetting():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.