IOS判断设备是否已越狱

- (BOOL)isJailbroken

{

    BOOL jailbroken = NO;

    NSString *cydiaPath = @"/Applications/Cydia.app";

    NSString *aptPath = @"/private/var/lib/apt/";

    if ([[NSFileManagerdefaultManager] fileExistsAtPath:cydiaPath])

    {

        jailbroken = YES;

    }

    if ([[NSFileManagerdefaultManager] fileExistsAtPath:aptPath])

    {

        jailbroken = YES;

    }

    return jailbroken;

}

如有疑问可进IOS中高级开发2群:118623167

posted @ 2012-12-05 23:11  super_chen  阅读(2183)  评论(1编辑  收藏  举报