const unsigned char *rawImgNSDataBuffer=(unsigned char *)[self.RNGbyImage.rawImgNSData bytes];
I am attempting to read my NSData by calling the method - (const void *)bytes. What I did is assign the returned bytes to my own unsigned char pointer, so as to read bytes inside rawImgNSData from this pointer rawImgNSDataBuffer. However, the returned pointer rawImgNSDataBuffer has always 0 contents. It is not nil, but it never contains char values I expect. I would guarantee that my NSData is not nil and NSData has length > 0. I was trying hard to read it but not worked. Any help would be much appreciated.
NSData bytes? "A read-only pointer to the receiver’s contents.", meaning that if the NSData object goes away so does the char data. - Hot Licks