For the following code, I can read all the data in the string, and successfully get the data for plot.
NSMutableArray *contentArray = [NSMutableArray array];
I setup a sample project and tried this code and it worked.
The two most probable points of error are
I would suggest adding:
NSLog( @"filePath: %@", filePath );
NSLog( @"Data: %@", Data );
and changing:
NSString *Data = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil ];
to
NSError* error; NSString* Data = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&error ];
and then adding:
NSLog( @"error: %@", error );
Of course, running this through the debugger and checking the return values should work as well and let you know exactly where it is failing.