Skip to content

Instantly share code, notes, and snippets.

@zld
Created May 28, 2015 04:18
Show Gist options
  • Save zld/64f60d17649a9ef54824 to your computer and use it in GitHub Desktop.
Save zld/64f60d17649a9ef54824 to your computer and use it in GitHub Desktop.
+ (BOOL)isJailbroken {
BOOL jailbroken = NO;
NSString *cydiaPath = @"/Applications/Cydia.app";
NSString *aptPath = @"/private/var/lib/apt/";
if ([[NSFileManager defaultManager] fileExistsAtPath:cydiaPath]) {
jailbroken = YES;
}
if ([[NSFileManager defaultManager] fileExistsAtPath:aptPath]) {
jailbroken = YES;
}
return jailbroken;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment