[CoreBluetooth] API MISUSE: can only accept this command while in the powered on state(iOS藍牙)

1.centralManagerDidUpdateState代理方法還沒有第一次被調用,就執行scanForPeripheralsWithServices方法,CBCentralManager還不知道你的藍牙是否可用,所以無法掃描

2.在藍牙關閉的情況下調用scanForPeripheralsWithServices方法

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章