Detecting iPhone/iPod Touch Accessories

后端 未结 5 1166
执笔经年
执笔经年 2020-11-30 05:00

Is it possible to detect if the iPod Touch/iPhone has any headphones or other accessories connected to it?

I\'m building an app that requires a microphone, and need

5条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 05:37

    In IOS 6 inputIsAvailable is deprecated. In the future we need to use inputAvailable:

    BOOL audioHWAvailable = audioSession.inputAvailable;
    

提交回复
热议问题