This file contains hidden or 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
| NSString *fileName = @"foo.json"; | |
| NSURL *documentsFolderURL = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; | |
| NSString *filePath = [documentsFolderURL.path stringByAppendingString:fileName]; | |
| NSString *jsonString = [[NSString alloc] initWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:NULL]; | |
| NSError *jsonError; | |
| NSMutableDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:[jsonString dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:&jsonError]; |
This file contains hidden or 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
| // Wordle Emoji Formatter | |
| // | |
| // Given the correct word and your guesses, generates an emoji representation and ALT text. | |
| let PUZZLE_NUMBER: number = 202; | |
| let WORD: string = 'slump'; | |
| let GUESSES: string[] = ['clear', 'hoist', 'dumpy', 'slump']; | |
| // --- |
OlderNewer