如何检测 iOS 应用程序正在越狱手机上运行? [英] How do I detect that an iOS app is running on a jailbroken phone?

查看:31
本文介绍了如何检测 iOS 应用程序正在越狱手机上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我希望我的应用在越狱的 iPhone 上表现不同,我将如何确定这一点?

If I want my app to behave differently on a jailbroken iPhone, how would I go about determining this?

推荐答案

这取决于你所说的越狱是什么意思.在简单的情况下,您应该能够查看 Cydia 是否已安装并通过该操作 - 类似

It depends what you mean by jailbreak. In the simple case, you should be able to see if Cydia is installed and go by that - something like

NSString *filePath = @"/Applications/Cydia.app";
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath])
{
   // do something useful
}

对于被黑客入侵的内核,涉及的内容要多一些(很多).

For hacked kernels, it's a little (lot) more involved.

这篇关于如何检测 iOS 应用程序正在越狱手机上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆