From 7c91da5c4800d304c5cad88b6bc31740d9dbf4b4 Mon Sep 17 00:00:00 2001 From: Connor Giles Date: Sat, 9 Jan 2016 23:34:50 -0500 Subject: [PATCH] Fixed advertising and discovery to start Services were never being added to start advertising and discovery. --- Discovery/Discovery.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Discovery/Discovery.m b/Discovery/Discovery.m index 87ed6c1..0eb0aef 100644 --- a/Discovery/Discovery.m +++ b/Discovery/Discovery.m @@ -56,14 +56,16 @@ - (instancetype)initWithUUID:(CBUUID *)uuid switch (startOption) { case DIStartAdvertisingAndDetecting: - _shouldAdvertise = YES; - _shouldDiscover = YES; + [self setShouldAdvertise:YES]; + [self setShouldDiscover:YES]; break; case DIStartAdvertisingOnly: - _shouldAdvertise = YES; + [self setShouldAdvertise:YES]; + [self setShouldDiscover:NO]; break; case DIStartDetectingOnly: - _shouldDiscover = YES; + [self setShouldAdvertise:NO]; + [self setShouldDiscover:YES]; break; case DIStartNone: default: