I don't see why execution falls into the debugPrint statement here, when the variables window (and print statements) show that test
is nil:
let test = cxticsByUuid[cxtic.uuid]
if test != nil
{
debugPrint("Duplicate cxtic retrieved. Bailing out of peripheral's didDiscoverCharacteristicsFor...")
return
}
UPDATE: Although the variables window shows that the variable in question is nil, it is in fact a double optional. So it must be unwrapped twice, as illustrated in the associated post.