I have a NSURL object which gives me the path of a local file (in documents folder). I want to populate an NSData object with the contents of this file
NSURL
NSData
Make sure your local URL starts with "file://" then you would just have to do this:
NSData *fileData = [NSData dataWithContentsOfFile:fileURL.path];