iOS 8.0 bluetooth peripheral manager giving no callback for addService

后端 未结 1 762
执笔经年
执笔经年 2021-01-20 08:03

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:36

    @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)
提交回复
热议问题