1

I'm running iOS8 beta 5 on an iPhone 4S and can't get iBeacon monitoring / ranging to work reliably. I initially get one call to didDetermineState telling me I'm out of the beacon region, but then I never get any more calls even if I'm obviously inside or outside the beacon region. On the initial call to didDetermineState, I don't get a call to didExitRegion, which seems wrong as well.

Has anyone experience this? I have granted Always authorization

user3091519
  • 107
  • 1
  • 12
  • Have you added NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription in your plist too ? Like it is mentioned in http://stackoverflow.com/questions/24062509/ios-8-location-services-not-working – cdescours Aug 29 '14 at 12:17
  • Yes. I have already received the popup granted always location access and granted it. – user3091519 Aug 29 '14 at 12:38
  • I haven't tried it on a 4S, only on an iPad Mini and it is fine - exactly the same code under 7 & 8 – Paulw11 Aug 29 '14 at 23:16

1 Answers1

3

Did you try with the Airlocate sample code provided by Apple? https://developer.apple.com/library/ios/samplecode/airlocate/introduction/intro.html Try this, it should work although I tried it and even with that "proved" code I can't range or monitor anything. Further more I found this interesting web with theoretically all you need to take account in order to get to work with iBeacons in IOS 8: http://nevan.net/2014/09/core-location-manager-changes-in-ios-8/

But your problem I think it's because the format of your adverts isn't Apple one's. You have to modify the Company identifier code in order to set this 0x004C, which matches with the Apple's one. I had Nordic's Company Identifier:

      +----------------------------------------------------+----------------- - - -
|     Packet sniffer frame header                    |
+----+-------------+-------------------------+-------+
|info| Packet nbr. | Time stamp              | Length|  Packet data
+----+-------------+-------------------------+-------+----------------- - - -
| 01 | 0C 00 00 00 | 49 12 27 44 00 00 00 00 | 30 00 | 2F D6 BE 89 8E 40 24 4E A0 C3 8B 04 FF 02 01 04 1A FF **59 00** 02 15 01 12 23 34 45 56 67 78 89 9A AB BC CD DE EF F0 00 01 00 01 BB BA 88 BA 37 A5
+----+-------------+-------------------------+-------+----------------- - - -

And you need:

+----------------------------------------------------+----------------- - - -
|     Packet sniffer frame header                    |
+----+-------------+-------------------------+-------+
|info| Packet nbr. | Time stamp              | Length|  Packet data
+----+-------------+-------------------------+-------+----------------- - - -
| 01 | 01 00 00 00 | ED 07 68 00 00 00 00 00 | 30 00 | 2F D6 BE 89 8E 40 24 E4 98 E6 3C 1B 5D 02 01 1A 1A FF **4C 00** 02 15 01 12 23 34 45 56 67 78 89 9A AB BC CD DE EF F0 00 00 00 00 C5 E8 19 24 3A A5
+----+-------------+-------------------------+-------+----------------- - - -

I have put between ** ** the hex numbers you should modify. Now it works perfect for me.

Regards.

Fulgor3
  • 389
  • 4
  • 18
  • +1, this was my exact problem. If you're running into something similar, as silly as it sounds, you might want to see if an Android phone can pick up your beacons to try and diagnose the problem. The Android app "nRF Beacon" was spectacular for this. – Andrew Vilcsak Jul 14 '15 at 23:01
  • We are currently working with Nordic SoC and we have apps for Android and iOS working well. The main problem is to capture the Bluetooth datagrams in background ( I recommend to check "AltBeacon" library, but the rest works perfect using the examples provided by Google. – Fulgor3 Jul 16 '15 at 06:15