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!

fvmitnick
  • 19
  • 4
  • hey i am facing the same problem. everything is work fine but when remove the app from the background no notification fire. – Sunny Shah Jun 04 '14 at 11:30

1 Answers1

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

Community
  • 1
  • 1
davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • 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 ). – fvmitnick Apr 05 '14 at 15:39
  • When you open another app in the foreground to range iBeacons, does the *foreground* app show you ranged iBeacons? – davidgyoung Apr 05 '14 at 15:53
  • 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. – fvmitnick Apr 06 '14 at 04:52
  • 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. – davidgyoung Apr 06 '14 at 11:29
  • 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? – fvmitnick Apr 07 '14 at 12:53
  • 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? – davidgyoung Apr 07 '14 at 13:10
  • After restart phone for awhile that can see iBeacon with airLocate.After about 5 to 8 hours, Airlocate can not see anything. – fvmitnick Apr 07 '14 at 16:30
  • 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: http://stackoverflow.com/a/22919846/1461050 – davidgyoung Apr 07 '14 at 18:07
  • 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). – fvmitnick Apr 08 '14 at 22:14
  • @davidgyoung 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 restart – Sunny Shah Jun 04 '14 at 11:32
  • @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. – davidgyoung Jun 04 '14 at 12:12