What is fileData? How is it defined and initialized? fileData = [NSMutableData data];. should be somewhere after: NSURLConnection *conn ...
stackoverflow.com