获取Mac地址

Mac地址模型说明

  • IDOGetMacAddrInfoBluetoothModel
参数 说明 备注
macAddr Mac地址 str
btMacAddr BT Mac 地址 str

命令代码

Objc:

[IDOFoundationCommand getMacAddrCommand:^(int errorCode, IDOGetMacAddrInfoBluetoothModel * _Nullable data) {
    if (errorCode == 0) {
       //获取成功
    }else if (errorCode == 6) {
       //设备不支持
    }else {
       //获取失败
    }
}];

Swift:

IDOFoundationCommand.getMacAddrCommand { (errorCode, model) in
    if errorCode == 0 {
        //获取成功
    }else if errorCode == 6 {
       //设备不支持
    }else {
       //获取失败.                                                                                                                                                                                                                                        
    }
};
Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by Gitbook修订时间: 2023-12-18 10:04:13

results matching ""

    No results matching ""