判断设备是否越狱
代码:
+(BOOL)isJailbroken { NSString *cydiaPath = @"/Applications/Cydia.app"; NSString *aptPath = @"/private/var/lib/apt/"; return [[NSFileManager defaultManager] fileExistsAtPath:cydiaPath] || [[NSFileManager defaultManager] fileExistsAtPath:aptPath]; }
其实就是判断那两个特殊的目录是否存在.