I would like my app to be informed when a headset/headphones is disconnected from an iOS
device after a period of idle time long enough for the app to have been cleaned up (and thus might not be running) similar to how a BroadcastReceiver
works in android. I suspect it's not possible but would appreciate any ideas.
I have looked into local and push notifications and the NSNotificationCenter
. Push notifications aren't appropriate because events happen on the device. It only seems possible to schedule (by specifying a time) local notifications and not create them from system events and notifications from the NSNotificationCenter
are only received when the app is running.
Have I misinterpreted any of the information above or is there another trick to use?