Check if Bluetooth is enabled

I am making an iOS app where I would like to check if Airplay via Bluetooth is enabled when the user starts the app, without any popup boxes. Then use this to disable audio input if Bluetooth is enabled. I have found this code, but I am not sure how to translate this to work in my objective-c++ file: