I´m getting an EXC_BAD_ACCESS when I trying to acces to the data, I suppose it is because I trying to acces to the internal data, but I don´t know How to solve this, the code:
//data->NSMutableData
int identi;
[data getBytes:&identi];
NSLog(@"identificador: %i",identi);
According to documentation,
The method is,
Parameters: buffer
A buffer into which to copy the receiver’s data. The buffer must be at least length bytes.
You are trying to save the receiver data into
identi, a int value.