Closed objectiveSee closed 10 years ago
- (void)peripheralManagerDidStartAdvertising:(CBPeripheralManager *)peripheral error:(NSError *)error
is getting called, and peripheral.isAdvertising is YES, and error is nil, but my Mac scanner (ScanBeacon) does not detect this beacon. I don't have another device to test with. Can anyone confirm what they are seeing on iOS7.1?
I just tested the Vicinity app on iOS7.1 and it's still working.
It's strange that ScanBeacon is not picking it up.
It's worth mentioning that Vicinity isn't broadcasting an iBeacon signal, but rather broadcasting a low-energy bluetooth signal.
Essentially it's not broadcasting the kCBAdvDataAppleBeaconKey
key. See this post for some insight into how you can broadcast a iBeacon signal: http://www.blendedcocoa.com/blog/2013/11/02/mavericks-as-an-ibeacon/
Thanks ben, so....that actually clears things up for me. ScanBeacon must only be looking for the iBeacon identifier (as it's an App made by an iBeacon manufacturer that all makes sense now).
Using the Vicinity app on two phones, I can now background one app and the other will recognize it. My Application only needs to be able to range between the two phones so I don't think I need kCBAdvDataAppleBeaconKey.
Side note: I just tried extending your code to also send kCBAdvDataAppleBeaconKey. ScanBeacon will detect the broadcast, but not Vicinity.
id value = [[self beaconAdvertisement] objectForKey:@"kCBAdvDataAppleBeaconKey"];
NSDictionary *advertisingData = @{CBAdvertisementDataLocalNameKey:@"vicinity-peripheral",
CBAdvertisementDataServiceUUIDsKey:@[identifier],
@"kCBAdvDataAppleBeaconKey":value};
Good to know. It's been a few months since I poked around with Bluetooth stuff. Not sure why Vicinity wouldn't pick it up.
We were in the same boat and only needed to detect proximity, not necessarily use iBeacon. And I've even heard that iOS7.1 greatly improved background detection. (iOS7.0 supported background broadcasting really well).
I am not able to broadcast in the background using this project. Once I minimize the App, the broadcast stops. Has anyone else had the background broadcast work?