转自: http://blog.csdn.net/kaizi318/article/details/9135385
关于判断iPhone是否是jailbreak机器,可参考如下代码:
static const char* jailbreak_apps[] = { "/Applications/Cydia.app", "/Applications/blackra1n.app", "/Applications/blacksn0w.app", "/Applications/greenpois0n.app", "/Applications/limera1n.app", "/Applications/redsn0w.app", NULL, }; - (BOOL)isJailBrokeDevice { // Check whether the jailbreak apps are installed for (int i = 0; jailbreak_apps[i] != NULL; ++i) { if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString thUTF8String:jailbreak_apps[i]]]) { return YES; } } return NO; }
iOS下如何判断机器是否越狱
BOOL isJailBreak() { int res = access(”/var/mobile/Library/AddressBook/AddressBook.sqlitedb”, F_OK); if (res != 0) return NO; return YES; }