代理方法

centralManagerDidUpdateState:

peripheralManagerDidUpdateState:代理方法。

centralManager:willRestoreState

peripheralManager:willRestoreState:代理方法

- (void)centralManager:(CBCentralManager *)central willRestoreState:(NSDictionary *)state
{
NSArray *peripherals = state[CBCentralManagerRestoredStatePeripheralsKey]; // TODO: ...
} D:\Program Files (x86)\Embarcadero\Studio\17.0\source\rtl\net\System.Mac.Bluetooth.pas
D:\Program Files (x86)\Embarcadero\Studio\17.0\source\rtl\osx\Macapi.Bluetooth.pas \17.0\source\rtl\net\System.Mac.Bluetooth.pas(3481):
    procedure centralManagerDidUpdateState(central: CBCentralManager); cdecl;
    [MethodName('centralManager:willRestoreState:')] procedure TInternalBluetoothLEManager.centralManagerDidUpdateState(central: CBCentralManager);

delphi在System.Mac.Bluetooth.pas实现了centralManagerDidUpdateState方法

procedure TInternalBluetoothLEManager.centralManagerDidUpdateState(central: CBCentralManager);
begin
if (central.state = CBCentralManagerStatePoweredOn) and FWaitingToDiscover then
begin
FWaitingToDiscover := False;
central.scanForPeripheralsWithServices(FFilterUUIDList, FScanOptions);
end;
end;

delphi也实现了 initWithDelegate方法

procedure TInternalBluetoothLEManager.centralManagerWillRestoreState(central: CBCentralManager; dict: NSDictionary);
begin end;

delphi IOS BLE 代理的更多相关文章

  1. Delphi IOS 蓝牙锁屏后台运行

    Delphi IOS 后台运行 同样的程序,编译成android,锁屏后继续运行正常,蓝牙通讯正常,但在IOS下锁屏后程序的蓝牙就中断通讯了? IOS的机制就是这样,锁屏就关闭了. 音乐播放器是怎么做 ...

  2. iOS 设置代理过程

    iOS设置代理的过程 (以模拟 button 作用为例) 1.写协议 新建一个名为 MyButton 的文件,继承于 UIView,在该文件里 声明协议 myDelegate 2.写协议方法 为声明的 ...

  3. 苹果开发证书相关BLOG与Delphi IOS环境安装(超详细)

    注:有好的资源,请添加了上传,上传后,通知管理员,删除旧文件,累积相关的学习资源,方便新手学习 一.相关论坛http://www.2ccc.com/ delphi 合子 www.2pascal.com ...

  4. delphi ios info.plist

    delphi ios info.plist delphi修改info.plist.TemplateiOS.xml文件,然后自动生成project1.info.plist http://docwiki. ...

  5. iOS设计模式 - 代理

    iOS设计模式 - 代理 原理图 说明 1. 代理模式大家都用过,但用抽象基类NSProxy实现代理估计鲜有人用 2. 本人用NSProxy实现了代理模式,对于理解消息转发机制有点帮助 源码 http ...

  6. delphi IOS 通知 TNotification

    delphi  IOS 通知 TNotification http://blogs.embarcadero.com/ao/2013/05/01/39450 TNotification http://d ...

  7. IOS BLE蓝牙4.0

    前言: 自己做的项目里面有这么一个功能,总结归纳一下. 先导入必要的框架  CoreBluetooth.framework 在要用到蓝牙的文件里面导入以下头文件 #import <CoreBlu ...

  8. Delphi iOS 开启文件共享 UIFileSharingEnabled

    Apple 在 iOS 提供了文件共享(FileSharing)功能,让 App 有一个对外窗口的目录,透过 iTunes 可以任意管理这个目录的文档内容(可拖入文档,也能将文档拖出备份). 如果 A ...

  9. ios透明代理抓包

    之前接到一些ios测试的时候,一些应用往往由于这样那样的原因(比如自实现的发包函数)导致直接使用本地ios系统的代理很难将数据代理到主机的burp或findler中,本文提供了一种解决该问题的途径 原 ...

随机推荐

  1. SPOJ Favorite Dice(数学期望)

    BuggyD loves to carry his favorite die around. Perhaps you wonder why it's his favorite? Well, his d ...

  2. js 字符串和数组注意点

    var a="foo"; var b=[ "f","o","o"]; a[1]="o"; b[1]= ...

  3. 每天一个linux命令(权限):【转载】chgrp命令

    在lunix系统里,文件或目录的权限的掌控以拥有者及所诉群组来管理.可以使用chgrp指令取变更文件与目录所属群组,这种方式采用群组名称或群组识别码都可以.Chgrp命令就是change group的 ...

  4. java运行jar命令提示没有主清单属性和找不到主类

    推荐一个java运行jar命令提示没有主清单属性的百度经验的链接:https://jingyan.baidu.com/article/db55b60990f6084ba30a2fb8.html jav ...

  5. jenkins for mac

    Mac环境中Jenkins的停止和启动命令启动sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist停止sudo launchc ...

  6. python(三):函数

    一.函数.名称空间与作用域 1.函数的构成 python有三种层次的抽象:(1)程序可分成多个模块:(2)每个模块包含多条语句:(3)每条语句对对象进行操作.函数大致处于第二层.函数有它的定义格式.参 ...

  7. 前端(六):JavaScript面向对象之宿主对象

    宿主对象即浏览器提供的对象,主要包括DOM对象和BOM对象. 一.DOM源起 1.SGML.XML和XHTML SGML(标准通用标记语言)是定义使用标签来表示数据的标记语言的语法. - 标签由一个小 ...

  8. python 客户端点对点通信小案例

    点对点通讯分为客户端和服务器,多个客户端通过服务器进行信息的交流 服务器端代码  service端 #!/usr/bin/env python # -*- coding:utf-8 -*- impor ...

  9. springboot上传下载文件

    在yml配置相关内容 spring: # mvc: throw-exception-if-no-handler-found: true #静态资源 static-path-pattern: /** r ...

  10. Linux 根文件系统目录结构

    /:根目录 /bin:linux的常用命令 /sbin:linux的常用命令 /lib:库文件(so.elf) /etc:系统配置文件和脚本文件 /sys:驱动相关的信息 /dev:设备节点目录 /p ...