gpt4 book ai didi

ios - 没有越狱检测

转载 作者:可可西里 更新时间:2023-11-01 03:06:14 24 4
gpt4 key购买 nike

我正在尝试制作一个只能在越狱的 iDevices 上运行的应用程序。我已经有越狱检测代码了:

([[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];
}}

但现在我需要能够检测设备是否未越狱。

最佳答案

尝试访问应用沙箱之外的任何文件。例如:

BOOL IsDeviceJailbroken(void) {
#if TARGET_IPHONE_SIMULATOR
return NO;
#else
return [[NSFileManager defaultManager] fileExistsAtPath: @"/bin/bash"];
#endif
}

请注意,安装 Cydia 和越狱设备是两回事。

关于ios - 没有越狱检测,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12342571/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com