DexcareSDK

  • The main class to initialize to use the DexCare Mobile SDK.

    See more

    Declaration

    Swift

    public class DexcareSDK
  • A structure defining a DexcareSDK Environment

    See more

    Declaration

    Swift

    public struct Environment
  • Information to set up the Virtual Visit Service

    See more

    Declaration

    Swift

    public struct VirtualVisitConfiguration
  • The main configuration structure used in initializing the DexcareSDK

    See more

    Declaration

    Swift

    public struct DexcareConfiguration
  • Undocumented

    Declaration

    Swift

    public typealias TokenRequestCallback = (String?) -> Void
  • The RefreshTokenDelegate protocol defines methods that allow you to handle any 401 errors that may return from network calls.

    See more

    Declaration

    Swift

    public protocol RefreshTokenDelegate : AnyObject
  • An example of a Logger that will log to the console. The DexCareSDK will use this logger calling the log(message, level, sender) function in this class with information.

    class ConsoleLogger: DexcareSDKLogger {
    
       static var shared: ConsoleLogger = ConsoleLogger()
    
       func log(_ message: String, level: DexcareSDKLogLevel, sender: String) {
           let emoji: String
           switch level {
               case .verbose: emoji = "➡️"
               case .debug: emoji = "✳️"
               case .info: emoji = "✏️"
               case .warning: emoji = "⚠️"
               case .error: emoji = "❌"
           }
           NSLog("\(emoji) \(sender): \(message)")
       }
    }
    

    This would show in the console as:

    ✳️ DexcareSDK: Response debug in 0.58s for: https://baseurl/v1/departments/epic.acme.one3511101000?byId=true&product=healthconnect-iOS - Status: 200 - Correlation: 16465A2F-69CE-4AF5-9FFA-827673AEF8F1
    

    The Correlation ID can help DexCare debug results.

    See more

    Declaration

    Swift

    public protocol DexcareSDKLogger