I need to convert this little Java code to Objective-C to execute a function in Objective-C, but it has an error that I still can not figure out.
Java code:
final char CHR0 = 0;
String finalprotocolo = "" + CHR0 + "";
String ligartv = "/ARP/IR/enviar/LigaTV" + finalprotocolo;
byte[] arrayligartv = ligartv.getBytes();
Objective-C code:
unichar c = 0x00;// c = 0x00;
NSString *nova = [NSString stringWithFormat:@"%c", c];
//NSString *nova = [NSString stringWithCharacters:&c length:1];
// Pega a menssagem<br>
NSString *final = @"/ARP/enviar/LigaTV";
NSString *mensagem = [final stringByAppendingString:nova];
I need to perform the same function as the Java code, just transforming byte 0 into String and adding the Objective-C message variable.