Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thii/dttjailbreakdetection
A jailbreak detection library for iOS
https://github.com/thii/dttjailbreakdetection
Last synced: 11 days ago
JSON representation
A jailbreak detection library for iOS
- Host: GitHub
- URL: https://github.com/thii/dttjailbreakdetection
- Owner: thii
- License: mit
- Created: 2014-01-03T08:28:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-04-18T00:09:58.000Z (over 1 year ago)
- Last Synced: 2024-05-02T01:11:36.351Z (6 months ago)
- Language: Objective-C
- Homepage:
- Size: 42 KB
- Stars: 279
- Watchers: 15
- Forks: 52
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DTTJailbreakDetection
=====================[![Version](https://img.shields.io/cocoapods/v/DTTJailbreakDetection.svg?style=flat)](http://cocoadocs.org/docsets/DTTJailbreakDetection)
[![License](https://img.shields.io/cocoapods/l/DTTJailbreakDetection.svg?style=flat)](http://cocoadocs.org/docsets/DTTJailbreakDetection)
[![Platform](https://img.shields.io/cocoapods/p/DTTJailbreakDetection.svg?style=flat)](http://cocoadocs.org/docsets/DTTJailbreakDetection)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg)](https://github.com/thii/DTTJailbreakDetection)# TL;DR
A library to detect if an iOS device is jailbroken or not.
# The good
> Checking whether a device is jailbroken or not can have many advantages for your application. As we have already seen, an attacker can run tools like Cycript, GDB, Snoop-it etc to perform runtime analysis and steal sensitive data from within your application. If you are really looking to add an extra layer of security for your application, you should not allow your application to be run on a jailbroken device. [Prateek Gianchandani]
# The bad
> Please note that millions of users jailbreak their devices and hence not allowing an application to be run on a jailbroken device could have a significant impact on your user base. Another thing you can do is instead block some of the features in your application rather than disabing it entirely. [Prateek Gianchandani]
# Installation
The easiest way to install DTTJailbreakDetection is to use CocoaPods. Just add the following line to your Podfile:
```ruby
pod 'DTTJailbreakDetection'
```# Usage
To start using DTTJailbreakDetection:
```obj-c
#import
```## Example
### iOS 7 or older
```obj-c
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
}
```### iOS 8 or newer
```obj-c
if ([DTTJailbreakDetection isJailbroken]) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"System Requirements"
message:@"This app is only supported on unmodified versions of iOS."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {
// End your app
}];
[alertController addAction:cancelAction];
[self presentViewController:alertController animated:YES completion:nil];
}
```# License
[MIT](http://thi.mit-license.org/)