ios - 使用 Core Bluetooth 时出现问题

标签 ios

我必须使用 coreBluetooth 将用户体重输入到应用程序中。但我没有找到特定设备的蓝牙服务和特性。请帮助我将重量机器的重量输入到 iOS 应用程序中。提前致谢。

最佳答案

查看LGBluetooth

这是从服务“5ec0”和特征“f045”读取数据的示例

        [LGUtils readDataFromCharactUUID:@"f045"
                             serviceUUID:@"5ec0"
                              peripheral:peripheral
                              completion:^(NSData *data, NSError *error) {
                                  NSLog(@"Data : %s Error : %@", (char *)[data bytes], error);
                              }];

连接以及特征/服务发现由框架自动管理。

我认为这将使您的工作更加轻松。

关于ios - 使用 Core Bluetooth 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24033830/

相关文章:

ios - 是否可以控制 UITableView 的速度和滚动

ios - 如何检测月/年变化

ios - 我想要 collectionView 中的表节标题索引或节标题标题(_ :cellForItemAt:)

ios - startUpdatingLocation 在 XCode 6.1 中不再有效

ios - 如何在 iPad 上将 AdMob 广告居中?

ios - 在 Collection View 中的单个单元格中播放视频

ios - 如何在 iOS 中使用图像创建连续动画

ios - 我的 Cocos2D-iPhone 游戏可以支持 VoiceOver 吗?

ios - 更改类名后 UITableViewController 的子类出错

ios - 非 ui 更新功能,例如读取 get 属性,是否需要在主线程中执行