Set up anti-lost commands
Function table
__IDO_FUNCTABLE__.funcTable11Model.antilost
Anti-lost model description
- IDOSetPreventLostInfoBuletoothModel
Parameter | Description | Remark |
---|---|---|
levelType | Anti-loss level | 0:Not anti-lost,1:Anti-lost at close range,2:Anti-lost at middle range,3:Anti-lost at long range |
Command code
Objc:
IDOSetPreventLostInfoBuletoothModel * model = [IDOSetPreventLostInfoBuletoothModel currentModel];
[IDOFoundationCommand setPreventLostCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetPreventLostInfoBuletoothModel.current();
IDOFoundationCommand.setPreventLost(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};