If you do the webservice check on the background thread, then you need to update UI on the main thread. Replace this line:
SwitchOutlet.on = YES;
with a block:
dispatch_async(dispatch_get_main_queue(), ^{
SwitchOutlet.on = YES;
});
and let us know.