I need to setup max size for file which is recording. I tried to use this method, but it updates the size once in 2-3 seconds. But I am trying to update it each 1 second with timer. But it returns the same size each time and updates once in 2-3 seconds.
func updateSlider() {
let attr = try FileManager.default.attributesOfItem(atPath: url.path)
let dict = attr as NSDictionary
let fileSize = Int(dict.fileSize())
}
Is there any way to set max file size for AVAudioRecorder?