Giter Club home page Giter Club logo

dttjailbreakdetection's Introduction

DTTJailbreakDetection

Version License Platform

tl;dr

A library to detect 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:

pod 'DTTJailbreakDetection'

Usage

To start using DTTJailbreakDetection:

#import <DTTJailbreakDetection/DTTJailbreakDetection.h>

Example

iOS 7 or older

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

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

dttjailbreakdetection's People

Contributors

thii avatar web-flow avatar

Watchers

iulianOnofrei (U-lee-aan) avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.