Skip to content

Instantly share code, notes, and snippets.

@omorandi
Created September 23, 2011 16:31
Show Gist options
  • Save omorandi/1237812 to your computer and use it in GitHub Desktop.
Save omorandi/1237812 to your computer and use it in GitHub Desktop.
+ (NSData*) resolveAppAsset:(NSString*)path;
{
static NSMutableDictionary *map;
if (map==nil)
{
map = [[NSMutableDictionary alloc] init];
//here the entry for app.js is created
//(I filled the hex string with garbage - it's only an example)
[map setObject:dataWithHexString @"DEADBEEF…" forKey:@"app_js"];
}
//here the content of the file at "path" is returned to the caller
return [map objectForKey:path];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment