CLLocationManager didEnterRegion: with iBeacon while app is suspended

 ̄綄美尐妖づ 提交于 2019-11-29 05:11:43

The comment "I just can't get it working when the app is killed" is critical.

If you use the iOS7 app switcher to kill an app (e.g. by swiping up on the app icon), then you will not be able to re-launch the app in the background upon entering or leaving an iBeacon region. This is by design -- if the user doesn't want the app running, then Apple thinks code should not be able to make it re-launch. See this thread.

Fortunately, users don't typically do this. For testing purposes, if you want to completely stop an app, don't do this. Reboot your phone instead. (Note, however, that it takes a minute or so after boot before you can detect iBeacons.)

EDIT 2014/03/10: This behavior has changed as of the release of iOS 7.1. Killing an app from the task switcher no longer stops it from detecting iBeacons in the background.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!