IOS 8.0 Bluetooth Peripheral Manager giving no callback for AddService

Source: Internet
Author: User
Tags pow

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.