Just want to chime in that I've had this issue for a while as well, and have filed it as FB15078575 on Sep 9 2024. It's very good to hear that you can confirm the bug, @DTS Engineer.
Post
Replies
Boosts
Views
Activity
I looked more into this. It seems that automatic sample rate conversion on iOS 18 is broken, at least between engine.inputNode and other AVAudioMixerNodes. I've worked around it by manually doing the sample rate conversion using AVAudioConverter, but this means that I no longer set up an audio graph with the inputNode connected to other nodes in the graph.
This seems like a major regression in AVAudioEngine.
I've been able to reproduce the problem with a small example project. I uploaded it to FB14713293, alongside new system diagnostics gathered right after running the example project. It is also available here: https://github.com/TapeIt/ios18-record-stuttering
The project contains a simple SwiftUI view with a record and a play button, a TapeDeck class that configures AVAudioSession and handles global recording and playback state, and a Recorder class that does the actual recording.
I also stumbled on a second bug: If you set the sampleRate to 48000 in Recorder.swift, another bug occurs: the stuttering is now faster, and happens on the entire recording.
Certainly. The ID is FB14713293, and a sysdiagnose is attached.
@Mcorey does that mean this feature only works on iOS 18?
Edit: just saw in the docs that indeed that is an iOS 18 only feature. That was not clear at all in the WWDC presentation, nor is it made clear in App Store Connect. That's a severe limitation.
Of course. Here's the Feedback ID: FB13797657
Same issue here - both in Xcode and in App Store Connect. Xcode Cloud doesn't detect branches.
I can confirm that shouldOptimizeForNetworkUse puts the moov atom at the beginning of the container. I verified this by opening an m4a file with an AVAssetReader and passing its content to an AVAssetWriter using AVAssetReaderInput and AVAssetWriterInput. This works like a charm.
However, when writing audio to the AVAssetWriterInput while I record, I need to convert the AVAudioPCMBuffer that I get from my tap on my audio input to a CMSampleBuffer that AVAssetWriterInput.append(sampleBuffer:) expects.
How do I do that? There are some answers on Google and StackOverflow on how to do it the other way around, but truth be told they don't seem particularly trustworthy.
Okay, I just "solved" this by deleting Xcode's entire DerivedData folder.
sudo rm -rf ~/Library/Developer/Xcode/DerivedData
(yes, that seems to require a sudo).
For some reason, it works again now. Hope this helps someone who's looking into this in the future.
Thanks so much for your reply! The second app is what we went for. It's a tiny bit scary as we have to trust that our backup app doesn't contain any bugs, but it works.
I filed a report: FB9735307
That’s certainly my understanding. And likewise for iTunes Finder backups. However, if you’re concerned about this, it’s easy enough for you to test.
Good to know.
So, to be clear, you’re referring to the Download Container and Replace Container items on the gear menu in the Installed Apps section of Devices and Simulators, right?
Yes, that's what I'm referring to. Do you have a recommendation on how to download and app replace group containers?