How to port this code in Objective-C? Anyone please help.
return data.length != 0 ? new Byte(data[0]) : null; // In Java
I am doing it this way, but this does not show the proper result
return datalen!= 0?malloc(sizeof(char) *data[0]) :NULL; //In Objective C it is write java data is byte
**In obj C** datalen int datalen = sizeof(data)/sizeof(*data);
I am unable to return data value. What is the problem?
You should return a NSData object: