0 Replies
      Latest reply on Jul 8, 2019 12:37 AM by irfan.awan123
      irfan.awan123 Level 1 Level 1 (0 points)

        We have placed the jailbreak check in our iOS application. this check is working fine maximum dvices. we have iPhone XS MAX, with iOS 12.3.2. and the application is not working on that. when we traced out the issue, we came to know that jailbreak check in our application is returning true on that device. while the device is not jailbroken.

         

        current check in swift for **** broken devices is as bellow:

        if FileManager.default.fileExists(atPath: "/Applications/*****.app")

                    || FileManager.default.fileExists(atPath: "/Library/MobileSubstrate/MobileSubstrate.dylib")

                    || FileManager.default.fileExists(atPath: "/bin/bash")

                    || FileManager.default.fileExists(atPath: "/usr/sbin/sshd")

                    || FileManager.default.fileExists(atPath: "/etc/apt")

                    || FileManager.default.fileExists(atPath: "/private/var/lib/apt/")

                    || UIApplication.shared.canOpenURL(URL(string:"*****://package/com.example.package")!)

                {

                    return true

                }

                return false

              

                let stringToWrite = "Jailbreak Test"

                do

                {

                    try stringToWrite.write(toFile:"/private/JailbreakTest.txt", atomically:true, encoding:String.Encoding.utf8)

                    print ("Device is jailbroken")

                    return true

                }catch

                {

                    return false

                }


        unfortunatly this check is returning true on iPhone X S MAX with iOS 12.3.1. where is the ltens version or jailbroken iOS is 12.1.2.
        So please let me know if there is any updated check to verify whether a device is jailbroken or not.