Syntax
-(BOOL)writeData:(NSData *)data;
Parameters
- data
- Data to send.
Return value
Returns YES if the transmission is successful. If data.length is 2036 bytes or more, NO is returned.
Remarks
- When sending to OPH-5000i, you can send to OPH-5000i by executing the writeData () method of OPHBluetoothService.
(Note)
According to the accessory interface specifications, the maximum length of External Accessory Protocol messages that OPH-5000i (MFi accessory) can receive from iOS devices is 2036 bytes.Requirements
#import <OPHBluetoothService/OPHBluetoothService.h>
Sample
Sample
-(IBAction)sendStringButtonClick:(id)sender { NSData *writeData = [@"TestSting" dataUsingEncoding:NSUTF8StringEncoding]; if(_service.isConnected){ //Send data to OPH-5000i [_service writeData: writeData]; } }
Related matters
Last updated: 2022/05/09