IPHONE – name of an application on /Applications on jailbroken iphones

iphoneiphone-sdk-3.0

I have an application using in-app purchase. Apparently, if the user has a jailbroken device with Cydia and is using Cydia's AppSync, the user cannot buy any in-app object, because AppSync interferers with the application.

The problem is that the error message Apple shows the user do not makes clear where the problem is.

I don't have any jailbroken iphone, so I cannot test this.

What I want to do is to use a code to identify programmatically if the iphone is jailbroken and then show a message before the user clicks to buy the in-app purchase.

this is the code

NSString *filePath = @"/Applications/Mail.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];  

    }

my idea is to check to see if I can find Mail.app on /Applications. As any locked iphone cannot check outside its environment and jailbroken iphones can, this code will show the alert when the file is found… in other words, when the iphone can find Mail.app.

My first question is: 1) is the mail application on the iPhone called Mail.app? I am guessing it is. If this is not true, please tell me a name of an application that exist in any iphone out-of-the-box.

Can someone with a jailbroken iphone test this code to see if it is working?
thanks for any help.

Best Answer

The mail app is called MobileMail.app. I have a jail-broken iPhone with Cydia installed but have successfully used in-app purchases (Epic Chef Wars).