I am trying to find that iphone / ipod is jailbreak. Then I thought that the application might try to access the file outside its scope, for example, try to find out if MobileMail.app is ...
here is the code
NSString *filePath = @"/Applications/MobileMail.app";
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath])
{
NSString *title = @"problem";
NSString *message = @"you are using a jailbroken iphone";
NSString * buttonOK = @"OK";
UIAlertView *alert = [[UIAlertView alloc] title message
delegate:self cancelButtonTitle: buttonOK otherButtonTitles:nil];
[alert show];
[alert release];
}
since jailbroken iphones can access areas outside their sandbox, and a regular iphone cannot, this code will theoretically show whether the device was hacked or not, but this is a problem.
Someone suggested that Apple could not approve an application using this code, as it might seem that the application is trying to access a file outside its sandbox.
It's true? If so, can you suggest another code that could check if the application is running on a jailbreak device?
.