swift获取越狱信息

NSFileManager *fm = [NSFileManager defaultManager];
NSMutableString *jodoEnrche = [NSMutableString string];
NSArray *enrfile = @[@"/Applications/Cydia.app",
@"/Library/MobileSubstrate/MobileSubstrate.dylib",
@"/bin/bash",
@"/usr/sbin/sshd",
@"/etc/apt",
@"/private/var/lib/apt/"];
for (NSString *path in enrfile) {
if([fm fileExistsAtPath:path])
{
[jodoEnrche appendString:@"1"];
}
else
{
[jodoEnrche appendString:@"0"];
}
}

你可能感兴趣的:(swift获取越狱信息)