Latest 2.1.0
Homepage https://github.com/snintelligent/SinoBLEInterface
License MIT
Platforms ios 8.0, requires ARC
Dependencies LKDBHelper, ProtocolBuffers
Frameworks Foundation, UIKit
Authors

三诺生物蓝牙血糖仪接入API

如何安装

1.使用CocoaPods安装

推荐使用这种安装方式。

step1:添加下面一条语句到Podfile:

pod 'SinoBLEInterface','~> 2.1.0'

step2:导入.h文件

#import "SinoSDK/SinoSDK.h"

2.手动安装

不推荐。

step1:添加SinoSDK.framework到工程中。

step2:添加下开源项目到工程中:

  • FMDB v2.6.2
  • LKDBHelper v2.4
  • ProtocolBuffers v1.9.11

step3:导入.h文件

#import "SinoSDK/SinoSDK.h"

如何使用

1.设置代理和数据源

@interface MainViewController ()<SCBLEInterfaceDelegate, SCBLEInterfaceDataSource>

2.初始化SDK配置

- (void)initSinoSDK {

    [SCBleInterface sharedInterface].delegate = self;
    [SCBleInterface sharedInterface].dataDelegate = self;

    [SCBleInterface sharedInterface].deviceType = SC_BLE_DEVICE_TYPE_TRUE;
    [[SCBleInterface sharedInterface] setAccessKey:self.accessKey secretKey:self.secretKey];

}

3.扫描

NSInteger rv = [[SCBleInterface sharedInterface] scan:8];

4.连接

NSInteger rv = [[SCBleInterface sharedInterface] connectedWithDevice:peripheral];

详细使用请查看SinoSDKDemo-v2.

更新日志

2.1.0 加入真睿血糖仪的支持

2.0.5 项目迁移

Latest podspec

{
    "name": "SinoBLEInterface",
    "version": "2.1.0",
    "summary": "A Sinocare SDK used on iOS.",
    "description": "It is a Sinocare BLE SDK used on iOS, which implement by Objective-C.",
    "homepage": "https://github.com/snintelligent/SinoBLEInterface",
    "license": "MIT",
    "authors": {
        "sinocare": "[email protected]"
    },
    "source": {
        "git": "https://github.com/snintelligent/SinoBLEInterface.git",
        "tag": "2.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "vendored_frameworks": "SinoSDK.framework",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "dependencies": {
        "LKDBHelper": [
            "~> 2.4"
        ],
        "ProtocolBuffers": [
            "~> 1.9.11"
        ]
    }
}

Pin It on Pinterest

Share This