Sobes.tech
Junior — Middle

Is it possible to record voice correspondence for later analysis or storage?

sobes.tech AI

Answer from AI

On iOS, it is not possible to directly record voice conversations (such as phone calls) for later analysis or storage due to system restrictions and Apple's privacy policies. Recording calls requires the use of third-party services or hardware solutions, as well as the consent of all participants, which is regulated by law.

To record audio within an app, you can use AVAudioRecorder, but this only works with audio recorded inside the app, not with system calls.

Example of recording audio inside an app:

import AVFoundation

let audioSession = AVAudioSession.sharedInstance()
try? audioSession.setCategory(.playAndRecord, mode: .default)
try? audioSession.setActive(true)

let recorder = try? AVAudioRecorder(url: fileURL, settings: settings)
recorder?.record()

But there are no standard APIs for recording voice conversations (phone calls) specifically.