ios检测是否越狱

var isJailbroken: Bool {
    let pathList = ["/Applications/Cydia.app",
                   "/Library/MobileSubstrate/MobileSubstrate.dylib",
                   "/bin/bash",
                   "/usr/sbin/sshd",  
                   "/etc/apt",
                   "/private/var/lib/apt/"]
    return pathList.filter({NSFileManager.defaultManager().fileExistsAtPath($0)}).count > 0
}
坚持原创技术分享,您的支持将鼓励我继续创作!