判断设备是否越狱

代码:

+(BOOL)isJailbroken {
    NSString *cydiaPath = @"/Applications/Cydia.app";
    NSString *aptPath = @"/private/var/lib/apt/";
    return [[NSFileManager defaultManager] fileExistsAtPath:cydiaPath] || [[NSFileManager defaultManager] fileExistsAtPath:aptPath];
}

其实就是判断那两个特殊的目录是否存在.

posted @ 2015-05-02 17:21  狠角色Cisse  阅读(190)  评论(0编辑  收藏  举报