BRLMPrinterSearcher
A Brother Label & Mobile printer searcher.
Overview
You use this object to search for printers. Available printers are returned as an array of BRLMChannel objects.
Class methods
startNetworkSearch:callback:
Begins searching for compatible printers that exist on the network.
Declaration
+ (BRLMPrinterSearchResult *)startNetworkSearch:(BRLMNetworkSearchOption *)searchOption callback:(void (^)(BRLMChannel *channel))callback
Parameters
| Name | Type | Description |
|---|---|---|
| searchOption | BRLMNetworkSearchOption * |
Option to control this function |
| callback | void (^)(BRLMChannel *channel) |
A function called whenever a printer is found |
Return Value
startNetworkSearch:ipAddress:
Searches for a compatible printer by specifying its IP address.
Declaration
+ (BRLMPrinterSearchResult *)startNetworkSearch:(nullable BRLMNetworkSearchOption *)searchOption ipAddress:(NSString *)ipAddress
Parameters
| Name | Type | Description |
|---|---|---|
| searchOption | BRLMNetworkSearchOption * |
Option to control this function |
| ipAddress | NSString * | IP address of the printer you search for |
Return Value
See BRLMPrinterSearchResult. If the printer does not respond or is not a compatible printer, the code of BRLMPrinterSearchError in the result is BRLMPrinterSearchErrorCommunicationError.
cancelNetworkSearch
Cancel searching for compatible printers that exist on the network.
Declaration
+ (void)cancelNetworkSearch;
startBluetoothSearch
Get the list of compatible MFi Bluetooth printers connected to the mobile device.
Declaration
+ (BRLMPrinterSearchResult *)startBluetoothSearch
Return Value
startBluetoothAccessorySearch:
Displays an alert view that allows user to pair the discovered Bluetooth accessory from inside your application. Since the view is OS standard one, the behavior may depend on the version of OS.
Declaration
+ (void)startBluetoothAccessorySearch:(void (^)(BRLMPrinterSearchResult *result))completionHandler;
Parameters
| Name | Type | Description |
|---|---|---|
| completionHandler | void (^)(BRLMPrinterSearchResult *result) |
A function called when user selects an accessory |
startBLESearch:callback:
Begins searching printers which support Bluetooth Low Energy.
Declaration
+ (BRLMPrinterSearchResult *)startBLESearch:(nullable BRLMBLESearchOption *)searchOption callback:(nullable void (^)(BRLMChannel *channel))callback;
Parameters
| Name | Type | Description |
|---|---|---|
| searchOption | BRLMBLESearchOption * |
Option to control this function |
| callback | void (^)(BRLMChannel *channel) |
A function called whenever a printer is found |
Return Value
cancelBLESearch
Cancel searching for compatible printers which support Bluetooth Low Energy.
Declaration
+ (void)cancelBLESearch;