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

查看:231
本文介绍了如何在越狱手机上检测到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天全站免登陆