I wanted to know whether we can call fork() and system() function within an iOS application? Whether apple review rejects the application.
In order to identify whether the device is jailbroken. I wanted to include the following code in application
In order to identify whether the device is jailbroken. I wanted to include the following code in application
Code Block let pid = fork() if(!pid) { return true } else if(pid >= 0) { return false } OR let system= system() if(system == 1) { return true } else if(system == 0) { return false }
I strongly recommend against this. Even if you ignore the App Store complications, checks like this always have binary compatibility impact, resulting in either false negatives or, worse yet, false positives.In order to identify whether the device is jailbroken.
A better option here is the DeviceCheck framework. See Establishing Your App’s Integrity.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"