Last active
January 19, 2016 18:46
-
-
Save Shehryar/ccd72206a5cbd0b415a9 to your computer and use it in GitHub Desktop.
Loads a local JSON file from app bundle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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