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