iOS app with iBeacon must restart device
Asked Answered
T

1

1

I built a simple ios app with IBeacon . I ran this app on an iPhone 4s whit ios7.1 while running an IBeacon base station.Everything is working right in background or foreground(exit region have 30 seconds delay in background).But over a period of time,about 3 hours,this app can not monitor any event though device setting were not change(blueTooth and locate is normal).This situation must restart the device.

Please tell me what should i do aboult this situation? Thanks!

Turtledove answered 4/4, 2014 at 4:45 Comment(1)
hey i am facing the same problem. everything is work fine but when remove the app from the background no notification fire.Republic
S
1

I wonder if iOS Bluetooth scanning is slowing down when your app is in the background such that it appears that events never fire because they are just taking so long to happen. Rebooting may speed up the cycle.

One way to force a Bluetooth LE scan cycle to look for iBeacons is to run a different app in the foreground that uses the CoreLocation iBeacon ranging APIs.

Try installing Locate for iBeacon, then as soon as your app appears to be not getting notifications in the basckground, launch Locate for iBeacon and tap Locate iBeacons. Do you see iBeacons? Does your background app get a notification?

If this works, then repeat the test and instead of using the Locate app to force a scan, just wait (an hour if needed). See if you eventually get your notification anyway, and note how long it took.

Edit: it appears that this is a case where iOS stops looking for iBeacons entirely requiring a reboot. See related question below.

iBeacon: didRangeBeacons stops getting called, must reset device for it to work again

Saltine answered 4/4, 2014 at 12:25 Comment(11)
This event appear all of apps with IBeacon(estimote,airLocate etc).I have tried to open another app and used IBeacon ranging APIs in foreground,but they do not get any notification. Bluetooth could scan beacon in iphone settings.but CLlocationManagerDelegate could not recieve any message.This situation has occurred on other developers and device(include iPhone5c,iPadmini2 ).Turtledove
When you open another app in the foreground to range iBeacons, does the foreground app show you ranged iBeacons?Saltine
Another app can not show information of ranged IBeacon. I was tried to uninstall all of my own app and only leave estimote(app) in order to remove impact of my app,but it not detected any iBeacon.Turtledove
OK, in order to eliminate any problems with the software I would use either Apple's AirLocaste test program or my Locate for iBeacon app. The Estimote app uses a wrapper SDK around CoreLocation, so it may introduce bugs/complexities in troubleshooting this that apps using raw CoreLocation do not. If you cannot range with Locate for iBeacon, then it means you have a OS level problem or a hardware problem.Saltine
I have tried to use Apple‘s Airlocate test program,but it do not see the Beacon.You app functions are normal on ios7.1?Turtledove
Airlocate and Locate for iBeacon are equivalent. Do you EVER see the iBeacon with Airlocate? Or just not after the phone has been on for awhile?Saltine
After restart phone for awhile that can see iBeacon with airLocate.After about 5 to 8 hours, Airlocate can not see anything.Turtledove
OK, so it sounds like CoreLocation can no longer see iBeacons after awhile. Check out this similar question on the issue, and see if you can run steps 2 and 3: https://mcmap.net/q/911414/-ble-in-the-backgroundSaltine
Thanks.I was scanned device in settings that can see Bluetooth devices.Maybe an OS problem as you said.The same problem also appeared in iphone 5c and ipad mini2 whit iOS7.1(other devices have not benn tested).Turtledove
@Saltine restart is also not working. i have checked with two day. get the notification with background and foreground but when i remove the app from the multitask. then i am not able to get any notification even after restartRepublic
@sunny-shah, please open a new question with more details about how you are testing and a snippet of your code that sets up monitoring.Saltine

© 2022 - 2024 — McMap. All rights reserved.