updated Version to detect if a headphone sits in  the iOS device or not, and be notified when it is plugged in or removed