Type Property

record

The category for recording audio; this category silences playback audio.

Declaration

static let record: AVAudioSession.Category

Discussion

This category has the effect of silencing virtually all output on the system, for as long as the session is active. Unless you need to prevent any unexpected sounds from being played, it's recommended that you instead use playAndRecord.

To continue recording audio when your app transitions to the background (for example, when the screen locks), add the audio value to the UIBackgroundModes key in your information property list file.

The user must grant permission for audio recording (see Recording Requires User Permission).