Skip to content

Instantly share code, notes, and snippets.

@ivira
Created February 29, 2012 22:01
Show Gist options
  • Save ivira/1944788 to your computer and use it in GitHub Desktop.
Save ivira/1944788 to your computer and use it in GitHub Desktop.
Check if Sandbox is ON
to determine whether you are running in the sandbox, compare the result of:
NSHomeDirectory ();
with:
struct passwd *userInfo = getpwuid(getuid());
NSString *homeDirectory = [NSString stringWithUTF8String:userInfo->pw_dir];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment