IOS之——判断设备是否越狱


@interface UIDevice (Helper)  
- (BOOL)isJailbroken;  
@end


@implementation UIDevice (Helper)  
- (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;  
}  
@end


转自:http://blog.csdn.net/pjk1129/article/details/7347382






你可能感兴趣的:(IOS之——判断设备是否越狱)