I am Adding the service using:
[Self.peripheralmanager Addservice:myservice];
Is this method deprecated in iOS8.0 or this error might being due to some other reasons?
Most likely some and reason, but we need more code. There is change between iOS7, iOS8 in, IOS7 permitted operations before the Bluetooth hardware was initialised (POW ER on state) and issued a warning. In iOS8 it just fails. Show the code for and how to call peripheralManagerDidUpdateState:
addService
–PAULW11 Sep @ 6:47
@Paulw have answered this correctly in the comments. Below is the answer
There is change between iOS7, iOS8 in, IOS7 permitted operations before the Bluetooth hardware was initialised (POW ER on state) and issued a warning. In iOS8 it just fails.
So we must wait for the peripheralManagerDidUpdateState:
callback before adding any service.
Http://stackoverflow.com/questions/26008296/ios-8-0-bluetooth-peripheral-manager-giving-no-callback-for-addservice
IOS 8.0 Bluetooth Peripheral Manager giving no callback for AddService