关于判断iPhone是否是jailbreak机器,可参考如下代码:

  1. static const char* jailbreak_apps[] = 
  2.         "/Applications/Cydia.app" 
  3.         "/Applications/blackra1n.app"
  4.         "/Applications/blacksn0w.app"
  5.         "/Applications/greenpois0n.app",
  6.         "/Applications/limera1n.app",
  7.         "/Applications/redsn0w.app"
  8.         NULL, 
  9. }; 
  10.  
  11. - (BOOL)isJailBrokeDevice
  12.         // Check whether the jailbreak apps are installed
  13.         for (int i = 0; jailbreak_apps[i] != NULL; ++i) 
  14.         { 
  15.                 if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString 
  16. thUTF8String:jailbreak_apps[i]]]) 
  17.                 {
  18.                         return YES; 
  19.                 } 
  20.         } 
  21.  
  22.         return NO;