Reputation: 447
I want to know how to Enable or disable Headphone Jack Connector of an iPhone, with Xcode and Objective-C.
Even if the device is plug on.
Upvotes: 0
Views: 2616
Reputation: 73628
Apple’s human interface guidelines for the implementation of iPad applications recommend that when either the docking connector or headphones are unplugged during audio playback that the audio be automatically paused and then resumed when the connection is reestablished. And not to completely disable the jack connector.
To detect Headphone connector you need to use kAudioSessionProperty_AudioRouteChange
and you need to add #import <AudioToolbox/AudioToolbox.h>
this framework to your build.
Upvotes: 2