Skip to content

Instantly share code, notes, and snippets.

@Shehryar
Last active January 19, 2016 18:46
Show Gist options
  • Save Shehryar/ccd72206a5cbd0b415a9 to your computer and use it in GitHub Desktop.
Save Shehryar/ccd72206a5cbd0b415a9 to your computer and use it in GitHub Desktop.
Loads a local JSON file from app bundle
NSError *error = nil;
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"fileName" ofType:@"json"];
NSData = JSONData = [NSData dataWithContentsOfFile:filePath];
NSDictionary *JSONDictionary = [NSJSONSerializatino JSONObjectWithData:JSONData options:kNilOptions error:&error];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment