I want to convert NSData to a byte array, so I write the following code:
NSData *data = [NSData dataWithContentsOfFile:filePath];
int len = [data length];
Byte byteData[len];
byteData = [data bytes];
But the last line of code pops up an error saying "incompatible types in assignment". What is the correct way to convert the data to byte array then?
 
     
     
     
     
     
     
    