title: How to convert NSData to byte array in iPhone?
body: <p>I want to convert <code>NSData</code> to a byte array, so I write the following code:</p>
  
  <pre><code>NSData *data = [NSData dataWithContentsOfFile:filePath];
  int len = [data length];
  Byte byteData[len];
  byteData = [data bytes];
  </code></pre>
  
  <p>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?</p>