Reputation: 29
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?
Upvotes: 0
Views: 547
Reputation: 64941
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:
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.
Upvotes: 0
Reputation: 2184
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).
Upvotes: 0