Capture Apple music is playing audio

How to capture the audio being played by apple music in ios and combine it with fft to achieve audio visualization?

Capture Apple music is playing audio
 
 
Q