Skip to content

Setting shouldAdvertise and shouldDiscover in init #21

@iasandcb

Description

@iasandcb

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;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions