I'm currently trying to get used to CoreBluetooth and iBeacon on iOS 7. When searching through the API, I noticed that there seem to be three ways to create and use iBeacons, and I'm not 100% sure what the differences are and when to use which. I found the following ways:
A location based approach using CBPeripheralManagerand CLLocationManagerwith CLBeaconRegion. This has the advantage that it gives me information about the proximity of devices. But since this is a location-based approach, it seems to me that I cannot transfer data with this, which I need.
CBPeripheralManager
CLLocationManager
CLBeaconRegion
Using the classes of the Framework Multipeer Framework, MCNearbyServiceBrowserand MCNearbyServiceAdvertiser. This is very easy to configure, allows you to transfer arbitrary data, but I do not receive any information about the proximity of the two devices that I need.
MCNearbyServiceBrowser
MCNearbyServiceAdvertiser
I found an example project from Apple where they use CBCentralManagerand CBPeripheral. This allows me to transmit arbitrary data and receive limited proximity information (I get RSSI, but not signal accuracy), but it seems rather complicated as there are a lot of callbacks and I have to take care of things like flow control.
CBCentralManager
CBPeripheral
So, I think, my question is: is there a preferred way? When to use which method? Can they be combined? For example, is it possible to listen to other devices using a location-based approach, and then connect to the device when it is near using the Multipeer Framework? If so, how can I make sure that I do not accidentally connect to the wrong device?
Thank!
iBeacon - , iBeacon , , -, - , . iBeacon iOS, , , .
CoreBluetooth - . " " (, ), . ( "" ) , / - , .
Multipeer Connectivity Framework Bluetooth WiFi , .
, , , .
, iBeacons. , Multipeer Connectivity, iBeacons . iBeacons - , .
CoreLocation CBCentralManager CBPeripheral, iBeacons, API- iBeacon iOS. . .
CoreLocation
iBeacons ( ), API CoreLocation. .
Source: https://habr.com/ru/post/1532113/More articles:Get Web Service Content - iphoneDate format and datapicker - angular-ui-bootstrapHow to vertically align the contents of a media body in Twitter Bootstrap? - htmlBackbone return promise - javascriptHow to compile a module with a new kernel in Linux - cWhat is the difference between getcsv () and getcsvfile () methods in magento? - phpTrigger trigger after receiving multiple json files asynchronously - jsonR ggplot on RHS when the x axis is a date - rhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1532117/how-can-i-force-all-implementations-to-call-a-specific-method-in-their-constructor&usg=ALkJrhgNQMPdGjkXeTcAWuztooaA-wXwyQHow to trigger a button click event when you press the enter button in C # - c #All Articles