0 Replies
      Latest reply on Oct 12, 2017 9:46 AM by bazmcbrien
      bazmcbrien Level 1 Level 1 (0 points)

        Hi Apple,


        Some users are having problem to record audio using our app, some of these are using iOS 11. Our app uses the class AVAudioRecorder.


        let recorderSettings: [String : AnyObject] = [
          "AVFormatIDKey": Int(kAudioFormatMPEG4AAC) as AnyObject,
          "AVSampleRateKey": Int(16000) as AnyObject,
          "AVNumberOfChannelsKey": Int(1) as AnyObject]
        do {
          let fileUrl: URL =  /**...*/
          recorder = try AVAudioRecorder(url: fileUrl, settings: recorderSettings)
          recorder?.delegate = self
          recorder?.isMeteringEnabled = true
        } catch let error {


        The AAC audio is generated correctly, if you listen the audio using QuickTime Player, everything is ok. But if you converts the audio to M4A for example, using this software or using AVAssetExportSession class to export a composition, the result audio removes a piece of audio on the end, still audible but loses information. We are thinking that is a problem related to the file header, since this is not happening on old versions of iOS. We have tested with differents AAC files and this problem only happens with this AAC created on iOS 11.


        Our app uses Swift 3.1.