Real-time Audio Analysis of Audio Played by Other Apps on iPhone

I’m evaluating a simple iOS application that would perform real-time beat detection and audio analysis.

My question is:

Can an App Store-compliant iOS application access or analyze audio that is being played by other applications on the same device (e.g. Spotify, Apple Music, YouTube, TikTok, Safari, etc.) in real time, without using the microphone?

Specifically:

  1. Is there any Apple-supported framework that allows access to system audio for real-time beat detection or frequency analysis?
  2. Can ReplayKit be used to analyze audio buffers from other applications in real time without recording or saving the audio?
  3. If direct access is not permitted, what Apple-approved architecture would be recommended for synchronizing external hardware with music being played on the iPhone?
  4. Would such an implementation be acceptable under App Store Review Guidelines?

I am trying to determine whether real-time beat detection from audio played by other apps is technically and policy-wise supported on iOS.

Thank you.

Real-time Audio Analysis of Audio Played by Other Apps on iPhone
 
 
Q