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

iOS 8.0 bluetooth peripheral manager giving no callback for addService的更多相关文章

  1. iOS 从0到1搭建高可用App框架

    iOS 从0到1搭建高可用App框架 最近在搭建新项目的iOS框架,一直在思考如何才能搭建出高可用App框架,能否避免后期因为代码质量问题的重构.以前接手过许多“烂代码”,架构松散,底层混乱,缺少规范 ...

  2. IOS BLE4.0蓝牙和外设连接和收发数据的流程

    前言: 苹果在IOS 6系统之后开始支持BLE 4.0,iPhone4s,iPod 5,iPad 3等之后的机型开始内嵌BLE4.0硬件,因此在开发前请先确认你的开发环境符合上述要求,并且苹果在BLE ...

  3. HierarchyViewer for iOS 2.0 BETA Introduction

    We know HierarchyViewer is an useful tool in Android SDK. The developer and tester, who haven't the ...

  4. iOS 10.0 更新点(开发者视角)

    html, body {overflow-x: initial !important;}html { font-size: 14px; } body { margin: 0px; padding: 0 ...

  5. iOS 7.0获取iphone UDID 【转】

    iOS 7.0 iOS 7中苹果再一次无情的封杀mac地址,使用之前的方法获取到的mac地址全部都变成了02:00:00:00:00:00.有问题总的解决啊,于是四处查资料,终于有了思路是否可以使用K ...

  6. iOS 5.0 后UIViewController新增:willMoveToParentViewController和didMoveToParentViewCon[转]

    在iOS 5.0以前,我们在一个UIViewController中这样组织相关的UIView   在以前,一个UIViewController的View可能有很多小的子view.这些子view很多时候 ...

  7. iOS 5.0 后UIViewController新增:willMoveToParentViewController和didMoveToParentViewCon

    在iOS 5.0以前,我们在一个UIViewController中这样组织相关的UIView   在以前,一个UIViewController的View可能有很多小的子view.这些子view很多时候 ...

  8. iOS 8.0正式公布啦

    从昨晚開始,苹果新版移动操作系统iOS 8.0開始提供免费下载服务.新版操作系统提供有数百个新功能,当中包含相机功能中添加了延时摄影模式,能够使用其它厂商开发的输入法.购买的App应用程序能够与最多6 ...

  9. embedded dylibs/frameworks are only supported on iOS 8.0 and later 错误解决

    ld: warning: embedded dylibs/frameworks only run on iOS 8 or later ld: embedded dylibs/frameworks ar ...

随机推荐

  1. poj 1068 Parencodings 模拟题

    Description Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two diff ...

  2. 周鸿祎与85后的座谈(一):人人需要Mentor,世界没有奇迹

    我们公司现在有将近 4000 人,我觉得里面肯定是卧虎藏龙.百里挑一的话,也有 40 个伟大的人才.但是,即使是天才,如果没有前辈的帮助,最后也会变成庸才,是做不出什么大事的.举例来说,每一个跳水冠军 ...

  3. noip第1课资料

  4. java基础知识-比较运算符

    演示比较运算符 == : 判断两个值是否相等 != : 判断两个数是否不相等(不能写成<>) > :判断左边值是否大于右边值 < :判断左边值是否小于右边值 >= : 判 ...

  5. iOS笔记之UIKit_UILable

    UILabel*label3 = [[UILabel alloc]initWithFrame:CGRectMake(0, 60+10+60+10+60+10, 320, 60)]; label3.ba ...

  6. 分形之拆分三角形(Split Triangle)

    前面讲了谢尔宾斯基三角形,它是不停地将一个三角形拆分三个与之相似的三角形.这一节给大家展示的图形是将一个等腰钝角三角形不停地拆分两个与之相似的三角形. 核心代码: static void SplitT ...

  7. Azure DevOps Server 2019 (TFS)安装教程

    概述 Azure DevOps Server 2019 (之前的名称为TFS),作为微软Azure DevOps 的企业私有(on-premises)服务器,是一个为开发团队提供软件协作开发管理的服务 ...

  8. C# 移动及限制移动距离

    public class PlaneMove : MonoBehaviour { //h:水平方向的控制,v:前后方向的控制 float h,v; //Speed:飞机的飞行速度 public flo ...

  9. 如何在C#中引入CPLEX的dll(CPLEX系列-教程一)

    以前写在CSDN上的文章.转到博客园之后,打算把这个教程移过来,顺便完善后面的教程.主要是在Asp.Net+EF6里面使用cplex,完成一个最优生产计划的决策.当时在查找如何在C#中引用cplex时 ...

  10. ASP.NET MVC高亮显示当前页面菜单

    1.创建MvcHtmlExtension扩展类 public static class MvcHtmlExtension { public static MvcHtmlString MenuLink( ...