iOS iBeacons Not Working on Few Devices - ios

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?

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).

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.

Related

Unable to detect Beacon device when iPhone sleeps.(goes background)

I am trying to detect iBeacon devices from Application on iPhone.
It detects iBeacon device while running, but when I lock an iPhone,
it cannot detect (lose) the same iBeacon device.
(Proximity:Unknown RSSI:0 Accuracy:-1.0)
It can detect other device as Android (App:Locate Beacon) on the same condition.
Can anyone help me to find the reason and solution?
Note:
iPhone <=> iBeacon device Fail
iPhone <=> Android (App:Locate Beacon/iBeacon) Ok
Android:AltBeacon does good for same device.
Android <=> iBeacon device Ok
iOS Apps must dynamically request and obtain permission from the user to "Always" access location data in order to detect beacons in the background. As of iOS 13 the flow has changed, and the operating system makes it harder to obtain the "Always" permission from the user.
Read more here: http://www.davidgyoungtech.com/2019/10/18/permission-denied
To verify if your app has obtained the required permission, go to Settings-> App Name -> Location and see if it has "Always" permission to access location data.
If you are using an iOS device as an iBeacon transmitter, the transmission will no longer work if the app is not visible on the screen. iPhone apps are not able to emit beacon advertisements when not in the foreground.
I have a same problem.
A similar post in the Apple Developer Forums in the past has not been resolved.
https://forums.developer.apple.com/thread/115996

Why is Iphone constantly transmitting a single beacon when it's bluetooth is enabled and it's screen is unlocked?

I've a iOS 10 device in my work place and I got curious about it's bluetooth's weird behaviour. So.. I was playing around with my Android's Beacon simulator App and I noticed that every time I unlocked my IPhone and enabled the Bluetooth a new entry was immediately created in my android's near by beacon's list. Is there a reason for that?
UPDATE 1
- handoff disabled
- AirDrop disabled
- No open apps.
= still got a mysterious broadcast on my Beacon Simulator App.
UPDATE 2
Ok, I was digging into the subject and noticed that the iOS device is not being able to find near by devices in a standard bluetooth discovery.
In the other hand, near-by devices can detected the iPhone and when clicking on his entry in their result's list a popup for pairing shows up on Iphone's screen and as if it was magic the name of the device trying to pair shows up on the iphone's list that is always empty, in this case Huawei P9 but tested with a note 4.
I am the developer of Beacon Simulator. I just want to warn that the app is a Beacon simulator before all, not really a Beacon scanner. I added the scanning part because it was easier to do some tests, for the beacon copy feature and also for future developments.
What the scanner will show you is not necessarily a beacon, but any scannable Bluetooth Low Energy devices, connectable or not. Unfortunately, it is difficult to know if a device is connectable or not with the Android API, so the app lists everything.
Since the icon represents a standard Bluetooth logo, it means it is a signal not recognized by the app (here, it isn't an iBeacon nor AltBeacon nor Eddystone beacon). So either it is a non standard beacon, or simply a signal to advertise a possible connection to the device. When a connectable device broadcast its presence, the signal uses the same channel and protocol than the one used by beacons. A connectable device will advert itself as connectable, but as said, the Android API erase this difference, unfortunately.
So what you see is not necessarily a beacon, but maybe simply your iPhone broadcasting its presence as a connectable device. Maybe I should add some disclaimers in the app.

iBeacon transmission when app is closed?

We would like to use some configuration of the iBeacon , where the user's iPhone will advertise its services, but when the app is closed.
So when a user come across a hardware beacon, it will recognise the user's iPhone(as a beacon) without opening the app, and even connect to it .
I could find here many opinions about that, but i wonder if there are any news with the iOS8 ,and if there is a clear answer for that from Apple ?
A couple of points:
Bluetooth beacons, iBeacons included, are transmit only. They don't see or "recognize" other beacons or phones. The statement "when a user come across a hardware beacon, it will recognise the user's iPhone(as a beacon)" is not possible with the technology regardless of whether the app on the phone is in the foreground or the background.
iBeacons are supported on iOS devices with version 7.x and 8.x of the operating system. On all these versions, however, beacon transmission from the iOS device is only supported when the app is in the foreground. See here for details.

Unable to transmit as an iBeacon from iPad Air

We have an existing iPad app that we are adding iBeacon transmitting capabilities to. I am unable to transmit an iBeacon signal. I won't provide the code at this point because I've also tested the Apple AirLocate example and the Radius Networks Locate iB app as a transmitter and in both cases the iPad won't transmit a beacon.
We tested with iPhone 5 devices and they can both transmit and range beacons.
What could be the issue with our iPad test device that it won't transmit? It can range beacons from the iPhones just fine.
BT is enabled. Location Services are enabled and approved for the apps in question.
Two likely causes:
The Proximity UUID of the iBeacon transmitter is not configured with Locate for iBeacon or Air Locate. Locate cannot see new iBeacons with unknown Proximity UUIDs. Even if the configuration is off by only a single digit, the iBeacon will be invisible.
Many users have reported recently that their phones are getting into a state where they cannot see iBeacons, and a reboot solves the problem. See here for more details.
How do you detect the iBeacon, actually?
I once encountered the problem that CLLocationManager#startMonitoringForRegion: did require a certain period of time, until the regions were updated and a region was ranged. So CLLocationManager#requestStateForRegion:...
In either way. What I first did to validate that beacons were emitting/sending correctly (not receiving): I downloaded a common Bluetooth Scanning-App and checked, whether the App is able to range the emitted beacon. Could you verify this at first? Maybe the iPad Air is sending correctly, but the receives do not range the beacon yet.

Can an iOS7 device act as an iBeacon?

Can an iOS7 device act as an iBeacon and figure out when other iOS7 devices come in its range? Do those other iOS7 devices need to have Bluetooth turned on?
An iOS device with BluetoothLE can act as an iBeacon yes.
Check out the AirLocate example code at https://developer.apple.com/downloads/index.action?name=WWDC%202013#
Being an iBeacon doesn't give feedback about devices that come into range so you'd have to implement that yourself. ie you'd have to have the devices that detect the iBeacon then tell the iBeacon they'd seen it through some other means.
Yes, an iOS device can act as a beacon, from iPhone 4s and up (Bluetooth 4.0 required).
You publish a beacon by passing the dictionary from [CLBeaconRegion peripheralDataWithMeasuredPower:] to [CBPeripheralManager startAdvertising:].
Publishing a beacon will not give you any feedback on devices, you'll have to scan for others publishing a beacon.
As for backgrounding, you can not publish a beacon in the background, your app needs to be running in the foreground for that. Scanning is possible in the background.
Yes, an iOS7 device can act as an iBeacon. You can do exactly what you are suggesting if you have an app installed on all phones, and you also write a web service. This would allow phone A to see phones B and C when they are nearby:
Your app on Phone A acts as an iBeacon advertising its presence.
Phones B and C see this iBeacon, waking up your app to make a call to your web service reporting that they both see Phone A's transmission.
Your app on Phone A queries this web service, which returns a list of phones that see Phone A. In this example, the list includes Phones B and C. Your app updates its display with this list.
All phones would need Bluetooth LE, have it turned on, and have your app installed. They would also need internet connectivity to call the web service.
If you're not set on using iBeacons, this project uses Bluetooth LE to share an array of ids between nearby phones- SimpleShare
You could set an ID for the user of each phone, share them between the phones over Bluetooth LE using the SimpleShare project (even while in background mode), and then query a web service to find out more information about the user with that ID.
One point that didn't come out clearly from the previous answers is that in order for the publishing to work (for example in David's answer's Phone A) the application that started publishing must be in foreground.
From the Apple documentation:
While your app is in the background, the local name is not advertised
and all service UUIDs are placed in the overflow area.
As mentioned, an iOS 7 device can act as an iBeacon, so long as it Bluetooth LE technology.
To use iBeacon, you need iOS 7 or later, Bluetooth turned on, and a compatible iOS device:
iPhone 4s or later
iPad (3rd generation) or later
iPad mini or later
iPod touch (5th generation) or later.
http://support.apple.com/kb/HT6048

Resources