I see the question already asked here:
AirPods not working as an input source for Voice Recorder App
I\'ve checked in with this thread but no response.
I think AirPods are MFI (Made For Iphone) accessories which means that bluetooth communication goes thru ExternalAccessory framework https://developer.apple.com/documentation/externalaccessory
Here is apple demo: https://developer.apple.com/library/content/samplecode/EADemo/Introduction/Intro.html
Tip: Protocol name must be put in Info.plist in UISupportedExternalAccessoryProtocols key
More details: https://mfi.apple.com/MFiWeb/getFAQ.action