The current code is
switch (startOption) {
case DIStartAdvertisingAndDetecting:
_shouldAdvertise = YES;
_shouldDiscover = YES;
break;
case DIStartAdvertisingOnly:
_shouldAdvertise = YES;
break;
case DIStartDetectingOnly:
_shouldDiscover = YES;
break;
case DIStartNone:
default:
break;
}
but, setting properties instead of setting ivars is necessary because otherwise Discovery won't start ad and scan.
switch (startOption) {
case DIStartAdvertisingAndDetecting:
self.shouldAdvertise = YES;
self.shouldDiscover = YES;
break;
case DIStartAdvertisingOnly:
self.shouldAdvertise = YES;
break;
case DIStartDetectingOnly:
self.shouldDiscover = YES;
break;
case DIStartNone:
default:
break;
}
The current code is
but, setting properties instead of setting ivars is necessary because otherwise Discovery won't start ad and scan.