Sonde Health API Platform Documentation

iOS Enrollment Module

Overview

The following document is a guide for your app development. The below steps will provide you the detailed information for Enrollment of the user’s voice.

 

  • Inherit “SondePassiveSDKEnrollmentDelegate” to access the delegate and methods for Enrollment.

class <ClassName>:SondePassiveSDKEnrollmentDelegate
  • Get microphone usage permission from iOS. To request microphone permission in iOS, you can follow these steps:

    • Open your Xcode project, and locate the Info.plist file, and add the following key-value pair:Key: "Privacy - Microphone Usage Description"

  • Request Microphone Permission:
    In your code, you can use the AVAudioSession class to request microphone permission. Here's an example in Swift:

import AVFoundation AVAudioSession.sharedInstance().requestRecordPermission { (granted) in if granted { // Microphone permission granted } else { // Microphone permission denied } }
  • Handle User Response:

    • Inside the completion block, you can handle the user's response to the microphone permission request. If permission is granted, you can proceed with using the microphone in your app. If permission is denied, you can handle it accordingly, such as by showing an alert or providing alternative functionality.

  •   Once microphone permission is granted follow the below steps

    objPassiveSDk?.enrollmentDelegate = self objPassiveSDk?.enrollmentHandling()
  • Add the required delegate methods

 

Sonde Health