zoukankan      html  css  js  c++  java
  • iOS 8.0 bluetooth peripheral manager giving no callback for addService

    I am adding the service using:

    [self.peripheralManager addService:myService];

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

    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 

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

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

  • 相关阅读:
    .Net常见笔试题
    冒泡排序算法 C#版
    Bundle捆绑压缩技术
    异步Ajax
    HtmlHelper总结
    HtmlHelper的扩展分页方法
    WCF
    程序猿值得看的几个技术网站(记录)
    Struts2和SpringMVC的区别
    nginx配置文件作用介绍
  • 原文地址:https://www.cnblogs.com/savagemorgan/p/4218343.html
Copyright © 2011-2022 走看看