Corebluetooth scanForPeripheralsWithServices method doesn't work for me in any device.all github app doesn't work with my ipod touch devices

I am working on bluetooth related app.but, I have not got any success.

in my application i want to connect iDevice to any other bluetooth device that scans.

but using the CBCentralManager scanForPeripheralsWithServices method, I didn't get any response in the didDiscoverPeripheral method.

The CBCentralManager allocation method is here: -

(void)viewDidLoad
    {
        [super viewDidLoad];

        // Start up the CBCentralManager
        _centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];

        _textview.userInteractionEnabled = NO; // not used in this test app
    }

      

Scan Method for CBCentralManager: -

(void)scanForPeripherals {
    if (self.centralManager.state != CBCentralManagerStatePoweredOn) {
        NSLog(@"CBCentralManager must be powered to scan peripherals. %d", self.centralManager.state);
        return;
    }

    if (self.scanning) {
        return;
    }

    self.scanning = YES;

    [self.centralManager scanForPeripheralsWithServices:nil options:@{ CBCentralManagerScanOptionAllowDuplicatesKey: @YES }];
    NSLog(@"Scanning started");
}

      

but i never get any response in didDiscoverPeripheral.can method can help me with this code.?

+3
android iphone ios8 bluetooth


source to share


No one has answered this question yet

See similar questions:

0
iOS does not see Android streaming as peripheral

or similar:

368
Identify device (iPhone, iPod Touch) using iOS
185
Android 4.3 Bluetooth Low energy unstable
43
Get the MAC address of the bluetooth low energy peripheral
23
Android - Bluetooth Discovery Finds No Device
6
Using Core Bluetooth to Receive Bluetooth LE Peripheral Advertising in the Background
4
CBCentralManager always returns state .poweredOff on iOS 11.1.x
2
IBeacon scan response may be received
1
BLE pheripheral not detected when ios app is in background
0
Peripheral services displaying null in all iOS BLE Scanner apps, but not in Android code.
0
CoreBluetooth advertisement does not start



All Articles
Loading...
X
Show
Funny
Dev
Pics