BTW I'm a Software developer and i worked on many ios apps
Determining if the idevice is jailbroken or not is very easy and can be performed by creating a programming 101 function.
For non programmers, it is simply performed by this way:
If device is jailbroken then
do wahtever you want ex: exit app, or restrict access to some options,
else
continue normal procedure
if really supercell devs doesnt know how to determine if a device is jailbroken or not, heres the code :
+(BOOL)isJailbroken{
#if !(TARGET_IPHONE_SIMULATOR)
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/Applications/Cydia.app"]){
return YES;
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/Library/MobileSubstrate/MobileSubstrate.dylib"]){
return YES;
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/bin/bash"]){
return YES;
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/usr/sbin/sshd"]){
return YES;
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/etc/apt"]){
return YES;
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/private/var/lib/apt/"]){
return YES;
}
if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"cydia://package/com.example.package"]]){
return YES;
}
FILE *f = fopen("/bin/bash", "r");
if (f != NULL) {
fclose(f);
return YES;
}
fclose(f);
f = fopen("/Applications/Cydia.app", "r");
if (f != NULL) {
fclose(f);
return YES;
}
fclose(f);
f = fopen("/Library/MobileSubstrate/MobileSubstrate.dylib", "r");
if (f != NULL) {
fclose(f);
return YES;
}
fclose(f);
f = fopen("/usr/sbin/sshd", "r");
if (f != NULL) {
fclose(f);
return YES;
}
fclose(f);
f = fopen("/etc/apt", "r");
if (f != NULL) {
fclose(f);
return YES;
}
fclose(f);
NSError *error;
NSString *stringToBeWritten = @"This is a test.";
[stringToBeWritten writeToFile:@"/private/jailbreak.txt" atomically:YES encoding:NSUTF8StringEncoding error:&error];
[[NSFileManager defaultManager] removeItemAtPath:@"/private/jailbreak.txt" error:nil];
if(error==nil){
return YES;
}
#endif
//All checks have failed. Most probably, the device is not jailbroken
return NO;
}
source: http://stackoverflow.com/questions/6...lbroken-device

