We have developed a low-level audio input solution for Windows, MacOS and iOS. It allows us to process audio immediately when each buffer is filled and delivered to our code. I cannot share my code here, but here are some hints of the API functions we use on iOS:
AudioQueueNewInput
AudioQueueAllocateBuffer
AudioQueueEnqueueBuffer
AudioQueueStart
AudioQueueStop