iOS 8.0 bluetooth peripheral manager giving no callback for addService

后端 未结 1 1874
野的像风
野的像风 2021-01-20 08:01

I have created a bluetooth peripheral manager. I am adding some services to this peripheral manager using [self.peripheralManager addService:myService].

For iOS7.0

相关标签:
1条回答
  • 2021-01-20 08:19

    @Paulw has answered this correctly in the comments. Below is the answer

    There is change between ios7 and ios8 in that ios7 permitted operations before the Bluetooth hardware was initialised (power on state) and issued a warning. In ios8 it just fails.

    So we must wait for the peripheralManagerDidUpdateState: callback before adding any service.

    0 讨论(0)
提交回复
热议问题