Can iOS receive broadcasts like Android?

前端 未结 1 1809
甜味超标
甜味超标 2021-01-13 03:16

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

1条回答
  •  遥遥无期
    2021-01-13 04:05

    Background processes and system event based broadcast receivers for an application that isn't running aren't possible in the current version (iOS 6) and any previous versions. There are no plans to make it possible that I have come across.

    As stated in the question, it is possible to use the NSNotificationCenter to achieve a similar affect but only if events that trigger the notifications are external to the phone or the notifications can be triggered from predetermined time.

    0 讨论(0)
提交回复
热议问题