关于判断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;
- }