Detecting iPhone/iPod Touch Accessories

后端 未结 5 1162
执笔经年
执笔经年 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:45

    To determine if the device has a built in microphone you can just go by [UIDevice currentDevice].model to see if it's an iPhone or a 2nd generation iPod Touch. As far as a third-party microphone plugged into the dock connector, this is not possible in the current 2.2.1 SDK, but it may be in a later version :)

提交回复
热议问题