本文介绍了没有越狱检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试创建一个适用于越狱iDevices的应用程序。我已经进行了越狱检测:
I'm trying to make an app which onely works on jailbroken iDevices. I allready made a jailbreak detection:
([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"cydia://"]]);{
UIAlertView *cydiaisinstalled=[[UIAlertView alloc]initWithTitle:@"Cydia is installed!"
message:@"You can use Respring!"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[cydiaisinstalled show];
}}
但现在我需要相反的事情。我需要一个非JAILBREAK检测。
But now I need the reverse thing. I need a NON JAILBREAK detection.
我需要你的帮助我需要这个用于Weblin。请帮助我!!!
I need your help I need this for Weblin. Please Help me!!!
推荐答案
尝试访问应用程序沙箱外的任何文件。例如:
Try accessing any file outside the app's sandbox. For example:
BOOL IsDeviceJailbroken(void) {
#if TARGET_IPHONE_SIMULATOR
return NO;
#else
return [[NSFileManager defaultManager] fileExistsAtPath: @"/bin/bash"];
#endif
}
请注意安装了Cydia并拥有越狱设备是两件不同的事情。
Note that having Cydia installed and having a jailbroken device are two different things.
这篇关于没有越狱检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!