Thickar
Thickar

Reputation: 171

Detect if device is jailbroken or not in Xamarin iOS

I have implemented the following methods to check.

            if(File.Exists("/Applications/Cydia.app")){
                 true;
            }

            String string = "test";
            try{
             File.WriteAllText("/private/est.txt",string);
                 true;
            }catch(Exception ex){
            }


            if(UIApplication.SharedApplication.CanOpenUrl(new NSUrl("cydia://package/com.cy.package")))
            {
                 true;
            }

I need to know how to call the System, Fork, OpenSSH Service Detection in Xamarin iOS and Suggest any other methods to check

Upvotes: 0

Views: 1996

Answers (1)

Gurjot Singh
Gurjot Singh

Reputation: 33

ios 10 jailbreak does not use Openssh and further i would recommend to try to execute a command that needs root and if it does not return a error mark as jailbroken. Also please add jailbreak detection only if needed.

Upvotes: 2

Related Questions