Any way to turn on bluetooth programmatically on iOS7+

后端 未结 3 1850
春和景丽
春和景丽 2020-12-20 22:52

I hear that iOS7 introduced this functionality with CBCentralManager but can\'t find how. Is possible? There is another way widthout use GKPeerPickerController?

3条回答
  •  情深已故
    2020-12-20 23:57

    use bluetooth Manager framework,

    import the bluetoothManager Framework, create a object of bluetooth manager framework, as btManager,

    write the following code in Bluetooth On button target

    [btManager setPowered:YES];
    [btManager setEnabled:YES];
    

    all the best...

提交回复
热议问题