Renaming a SCiO device
June 21, 2016
A SCiO device can be renamed using the renameDeviceWithName API call.
The following code sample sets a new name for the SCiO device.
__weak typeof(&*self)weakSelf = self; [[CPScioDevice sharedInstance] renameDeviceWithName:name completion:^(BOOL success, NSError *error) { if (success) { dispatch_async(dispatch_get_main_queue(), ^{ weakSelf.scioNameLabel.text = name; }); return; } [weakSelf alertWithTitle:error.userInfo[NSLocalizedDescriptionKey] message:error.userInfo[NSLocalizedFailureReasonErrorKey]]; }];
Leave a Reply
You must be logged in to post a comment.