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
iOS 8.0 bluetooth peripheral manager giving no callback for addService的更多相关文章
- iOS 从0到1搭建高可用App框架
iOS 从0到1搭建高可用App框架 最近在搭建新项目的iOS框架,一直在思考如何才能搭建出高可用App框架,能否避免后期因为代码质量问题的重构.以前接手过许多“烂代码”,架构松散,底层混乱,缺少规范 ...
- IOS BLE4.0蓝牙和外设连接和收发数据的流程
前言: 苹果在IOS 6系统之后开始支持BLE 4.0,iPhone4s,iPod 5,iPad 3等之后的机型开始内嵌BLE4.0硬件,因此在开发前请先确认你的开发环境符合上述要求,并且苹果在BLE ...
- 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 ...
- iOS 10.0 更新点(开发者视角)
html, body {overflow-x: initial !important;}html { font-size: 14px; } body { margin: 0px; padding: 0 ...
- iOS 7.0获取iphone UDID 【转】
iOS 7.0 iOS 7中苹果再一次无情的封杀mac地址,使用之前的方法获取到的mac地址全部都变成了02:00:00:00:00:00.有问题总的解决啊,于是四处查资料,终于有了思路是否可以使用K ...
- iOS 5.0 后UIViewController新增:willMoveToParentViewController和didMoveToParentViewCon[转]
在iOS 5.0以前,我们在一个UIViewController中这样组织相关的UIView 在以前,一个UIViewController的View可能有很多小的子view.这些子view很多时候 ...
- iOS 5.0 后UIViewController新增:willMoveToParentViewController和didMoveToParentViewCon
在iOS 5.0以前,我们在一个UIViewController中这样组织相关的UIView 在以前,一个UIViewController的View可能有很多小的子view.这些子view很多时候 ...
- iOS 8.0正式公布啦
从昨晚開始,苹果新版移动操作系统iOS 8.0開始提供免费下载服务.新版操作系统提供有数百个新功能,当中包含相机功能中添加了延时摄影模式,能够使用其它厂商开发的输入法.购买的App应用程序能够与最多6 ...
- 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 ...
随机推荐
- best performance / best appearance
- MapServer和GeoServer对比
https://blog.csdn.net/theonegis/article/details/45823099
- maven依赖管理
maven依赖管理 1.依赖范围 (依赖相当于java中的import 是否需要导入别的jar包) 使用控制依赖与三种classpath(编译期,测试时期,运行时期)的关系 complie ...
- 阿里云 oss实时日志查询
实时日志查询 更新时间:2019-01-29 10:31:49 编辑 · 本页目录 开启实时日志查询 查询实时日志 参考文档 用户在访问 OSS 的过程中,会产生大量的访问日志.实时日志查询功能将 O ...
- java静态代码块、普通代码
参考文章:http://www.cnblogs.com/qinpengming/p/5227227.html Java中经常有一些静态块,这是用来在生成类之前进行的初始化,无论java还C++语言中的 ...
- hdu 5060 五种情况求圆柱体与球体交
http://acm.hdu.edu.cn/showproblem.php?pid=5060 官方题解http://bestcoder.hdu.edu.cn/给复杂了 实际上用圆柱体与球体体积差的积分 ...
- JVM的參數
博客:https://www.cnblogs.com/redcreen/archive/2011/05/04/2037057.html#CMSInitiatingOccupancyFraction_v ...
- A - Playground
My kid's school cleared a large field on their property recently to convert it into a playing area. ...
- java 注释annotation学习---两篇不错的blog
深入理解Java:注解(Annotation)自定义注解入门 ---- http://www.cnblogs.com/peida/archive/2013/04/24/3036689.html 深入理 ...
- Apollo 配置详细步骤(Windows环境)
一. 准备工作 1.下载 apollo 安装包 下载链接:http://activemq.apache.org/apollo/download.html 2.下载 JavaJDK 安装包 ( apol ...