小编VJV*_*JVJ的帖子

iBeacon上可以写数据吗

我将在我的应用程序中使用 iBeacon。打开应用程序时是否可以在其上写入值。如果是,我该如何实现这一目标。通过使用 coreBluetooth 我可以做到这一点。

NSData *bytes = [@"0xDE" dataUsingEncoding:NSUTF8StringEncoding];
[peripheral writeValue:bytes forCharacteristic:characteristic
        type:CBCharacteristicWriteWithResponse];
Run Code Online (Sandbox Code Playgroud)

objective-c ios core-bluetooth bluetooth-lowenergy ibeacon

1
推荐指数
1
解决办法
1423
查看次数