How does iBeacon awaken our app? How long? And how to extend this time?

after some research on iBeacon, I had the following questions that I could not find in the extended help:

  • How does iBeacon awaken our app? Does it wake up our application by putting our application in the background if the application was paused?

  • In what background mode did iBeacon turn on our application? What can we do in this background?

  • How long can this background last until it pauses? When it is paused, what function was called?

  • How can we extend this background time if we need?

  • As we all know, iBeacon only wakes up our application when the region changes (input / output), but how do we restart the user application if the user is still in the same region?

Thanks in advance.

+4
source share
1 answer

Some answers:

  • iBeacon can wake your application in the background using the monitoring API. He can do this even if your application has not been launched since the device was rebooted or even if the application was killed using the task switcher (although the latter requires iOS 7.1+). This works by your application calling the method startRangingBeaconsInRegion:on CLLocationManager, and also implement the methods CLLocationManagerDelegate locationManager:didDetermineState:forRegion:, locationManager:didEnterRegion:and / or locationManager:didExitRegion:.

  • , , , , . , , . , , - , . ( , .)

  • - , . ( , .) , , UIApplicationDelegate protocol applicationWillResignActive:, .

  • , beginBackgroundTaskWithExpirationHandler: UIApplication. , .

  • , , , , . , , . . , /.

+9

Source: https://habr.com/ru/post/1547275/


All Articles