Skip to content

Instantly share code, notes, and snippets.

@macLai
Created July 18, 2018 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macLai/ecbca57ae71434be069400fcb2f59106 to your computer and use it in GitHub Desktop.
Save macLai/ecbca57ae71434be069400fcb2f59106 to your computer and use it in GitHub Desktop.
NSString *path = nil;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
if ([paths count])
{
NSString *bundleName =
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
path = [[paths objectAtIndex:0] stringByAppendingPathComponent:bundleName];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment