0

I have been trying to run iBeacon Receiver sample. The code is supposed to detect the devices entry into a region and exit out of region. The iBeacon region is created by a transmitter that is running on another iOS device.

The receiver code works perfectly in one of the devices I have (iOS 7.0.1). It is detecting the entry and exit out of the region. But the same code does not work on couple of other devices with iOS 7.1 [iPad Air] and iOS 8.0 [iPad Mini].

I believe these hardwares support Bluetooth LE.

Will I be missing some configuration on the devices? I am not able to track it down. Could you please suggest?

AiOS
  • 29
  • 2
  • What do you mean by "doesn't work"? That is not a description of anything meaningful. There are only expectations and actual results. What is actually happening? Not every device has the right hardware. You should be testing this up front before your code runs. If you do and your code fails gracefully, it _is_ working. – matt Dec 27 '14 at 17:51
  • hi matt, added bit more information to the question. – AiOS Dec 28 '14 at 08:04
  • You didn't really add more information. You don't show "the receiver code" so how can anyone know if that is even correctly written code? To ask a question, show your code and state what actually happens and how you _know_ what actually happens. Having a "feeling" that something "does not work" is not programming and it isn't specific enough to be a good Stack Overflow question. Why should anyone _believe_ that it "isn't working" otherwise? All we know so far is that _you think_ it isn't working, which is not interesting. – matt Dec 28 '14 at 18:01

2 Answers2

0

Beacon apps that work on iOS 7 silently fail to detect beacons when built for iOS 8, if they have not requested location permissions. See here for details:

In iOS 8 Beacon not detecting

This would not explain why the code you mention does not work on iOS 7.1, so perhaps that device has a hardware issue (Bluetooth off or Bluetooth LE unsupported.) The first iOS device to support Bluetooth LE is the iPhone 4S so 4 and earlier devices cannot detect beacons.

Community
  • 1
  • 1
davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • Dear david, I am using the latest devices. iPad Air and iPad Mini. They do support Bluetooth LE! – AiOS Dec 28 '14 at 08:08
  • I would try an off the shelf app like Locate to detect beacons on these devices. If that doesn't work, it could indicate a hardware problem. https://itunes.apple.com/us/app/locate-beacon/id738709014?mt=8 – davidgyoung Dec 28 '14 at 13:43
0

AFA iOS 8, when you do request permissions, be sure to add the new info.plist entries describing why your app is requesting the specific permission type(s) else it will continue to fail (frustratingly) silently.

See http://nevan.net/2014/09/core-location-manager-changes-in-ios-8/ (which is linked to via SO: iOS: App is not asking user's permission while installing the app. getting kCLAuthorizationStatusNotDetermined every time - Objective-c & Swift ) for more info.

One symptom I've seen to indicate you're in the "don't have the plist entries" state is that when looking at Location Services permissions in Settings, you can manually set the permission to "Always" but when you run the app, the selection clears (that is, you have no selection as to permission for that app for Location Services).

Community
  • 1
  • 1
Brad Brighton
  • 2,179
  • 1
  • 13
  • 15
  • Dear Brad, the same has been tried. They are asking for permission through a similar prompt. But even after allowing the location detection, the region entry and exit are not detected! – AiOS Dec 28 '14 at 08:06
  • In terms of troubleshooting, I also find good results modifying Apple's AirLocate sample code (it's just a matter of adding UUIDs for the most part) and LightBlue (third-party app in the App Store, for BTLE detection in general, not necessarily beacons) to help isolate if it's the device or software that's failing to register. Also, when the device thinks it's already "in the region", enter notifications aren't sent (and the same for "outside"/exit) though I've really only seen that be an issue with actual region monitoring, not beacons so far. – Brad Brighton Dec 29 '14 at 00:38