用于检测 iOS 设备是否越狱的库。
检查设备是否越狱可以给您的应用程序带来许多好处。我们已经看到,攻击者可以运行 Cycript、GDB、Snoop-it 等工具来执行运行时分析并从您应用程序内部窃取敏感数据。如果您真的想为应用程序添加额外一层安全,则不应该允许在越狱设备上运行应用程序。[Prateek Gianchandani]
请注意,数百万用户越狱了他们的设备,因此不允许在越狱设备上运行应用程序可能会对您的用户群产生重大影响。您还可以做的是,而不是完全禁用它,而是阻止应用程序中的某些功能。[Prateek Gianchandani]
安装 DTTJailbreakDetection 的最简单方法是使用 CocoaPods。只需将以下行添加到您的 Podfile 中
pod 'DTTJailbreakDetection'
要开始使用 DTTJailbreakDetection
#import <DTTJailbreakDetection/DTTJailbreakDetection.h>
if ([DTTJailbreakDetection isJailbroken]) {
UIAlertView * alert =[[UIAlertView alloc ] initWithTitle:@"System Requirements"
message:@"This app is only supported on unmodified versions of iOS."
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
// End your app
}