iOS 8.0 bluetooth peripheral manager giving no callback for addService

I am adding the service using:ios

[self.peripheralManager addService:myService];this

Is this method deprecated in iOS8.0 or this error might be due to some other reasons?spa

 

Most likely some other reason, but we need more code. 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. Show the code for peripheralManagerDidUpdateState: and how you call addService–  Paulw11 Sep 24 '14 at 6:47 code

 

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

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.get

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

 

http://stackoverflow.com/questions/26008296/ios-8-0-bluetooth-peripheral-manager-giving-no-callback-for-addserviceio

相關文章
相關標籤/搜索