JMBle.h

Introduction

Use the links in the table of contents to the left to access the documentation.



Classes

JMWirelessBasic

无线蓝牙通讯



Methods

+connectWithPeripheral:formRecovery:complete:
+scanWithDiscover:
+shareBle

connectWithPeripheral:formRecovery:complete:


- (void)connectWithPeripheral:(nonnull CBPeripheral *)peripheral 
        formRecovery:(BOOL)formRecovery complete:(nullable JMComplete)completed;  
Parameters
peripheral

外设

formRecovery

是否使用防丢单协议

completed

连接完成回调

Discussion

连接外设


scanWithDiscover:


- (void)scanWithDiscover:(nullable JMDiscoverBle)discover;  
Parameters
discover

发现打印机回调

Discussion

扫描打印机


shareBle


+ (nonnull JMBle *)shareBle;  
Return Value

JMBle 单例对象

Discussion

单例


Properties

peripheral

外设 -connectWithPeripheral:defendLose:complete: 中设置值,在下一次设置值前,其值不变

state

蓝牙状态


peripheral


外设 -connectWithPeripheral:defendLose:complete: 中设置值,在下一次设置值前,其值不变

@property (nonatomic,
    strong,
    readonly,
    nullable) CBPeripheral *peripheral;  

state


蓝牙状态

@property (nonatomic,
    assign,
    readonly) CBCentralManagerState state;  

Macro Definitions

SINGLETONBLE

SINGLETONBLE


#define SINGLETONBLE [JMBle shareBle] 
Discussion

蓝牙单例对象