Mili (Xiaomi bracelet) iOS API and demo app. Current API based on firmware v1.0.3.0 (app v1.1.372).
MLCentralManager *manager = [MLCentralManager initSharedManagerWithDelegate:nil];
[manager scanForMilisWithBlock:^(MLMiliPeripheral *mili, NSNumber *RSSI, NSError *error) {
userInfo = ...;
[manager stopScan];
[mili connectWithUserInfo:userInfo block:^(MLMiliService *service, NSError *error) {
[service readDeviceInfoWithBlock:^(MLDeviceInfoModel *deviceInfo, NSError *error) {
NSLog(@"%@", deviceInfo);
}];
}];
}];
Please check MLCentralManager.h, MLMiliPeripheral.h, MLMiliService.h and the demo app for more details.
Note that current demo will use a fake user info for authentication, this will replace the old profile and cause mili vibrate (re-auth) when connected.
See Characteristics.
- Send firmware
- More precise error
- Separate API from demo app
- Documents
MIT