(void) connection:(NSURLConnection )connection didReceiveData:(NSData )data
{
[self.receivedData appendData:data];
// convert data to array
// ??? the below is not working
NSMutableArray *receivedDataAsArray = [NSPropertyListSerialization
propertyListFromData:self.receivedData
mutabilityOption:NSPropertyListImmutable format:nil errorDescription:nil];
}
I use the above with NSURLConnection to get the data (serialized array). I want to convert it to an NSMutableArray. While the above doesn't return an error, it doesn't return a populated array either (though I am definitely receiving data). Any help as to how to properly convert NSData/NSMutableData to NSArray/NSMutableArray?