title: Jailbreak check method, apple will approve this?
body: <p>In my app i need to check sometimes if the running device is a jailbreak device or not. This is the most complete method i have found:</p>
  
  <pre><code>BOOL Jail=NO;
  if ([[NSFileManager defaultManager] fileExistsAtPath:@"/Applications/Cydia.app"] ||
     [[NSFileManager defaultManager] fileExistsAtPath:@"/Library/MobileSubstrate/MobileSubstrate.dylib"] ||
     [[NSFileManager defaultManager] fileExistsAtPath:@"/bin/bash"] ||
     [[NSFileManager defaultManager] fileExistsAtPath:@"/usr/sbin/sshd"] ||
     [[NSFileManager defaultManager] fileExistsAtPath:@"/etc/apt"] ||
     [[NSFileManager defaultManager] fileExistsAtPath:@"/private/var/lib/apt/"] ||
     [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"cydia://package/com.example.package"]])  {
    Jail= YES;
  }
  
  FILE *f = NULL ;
  if ((f = fopen("/bin/bash", "r")) ||
     (f = fopen("/Applications/Cydia.app", "r")) ||
     (f = fopen("/Library/MobileSubstrate/MobileSubstrate.dylib", "r")) ||
     (f = fopen("/usr/sbin/sshd", "r")) ||
     (f = fopen("/etc/apt", "r")))  {
    fclose(f);
    Jail= YES;
  }
  fclose(f);
  
  NSError *error;
  NSString *stringToBeWritten = @"This is a test.";
  [stringToBeWritten writeToFile:@"/private/jailbreak.txt" atomically:YES encoding:NSUTF8StringEncoding error:&amp;error];
  [[NSFileManager defaultManager] removeItemAtPath:@"/private/jailbreak.txt" error:nil];
  if(error == nil)
  {
    Jail= YES;
  }
  </code></pre>
  
  <p>What i haven't found, it's a clear answer to the question: "Apple will approve this code?" , in guidelines i can read:</p>
  
  <pre><code>"Apps that read or write data outside its designated container area will be rejected".
  </code></pre>
  
  <p>However it's clear that i'm trying to write or read only to check if the device is jailbroken... So there's someone that have successfully submitted this code to apple?</p>