-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 74cc942
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// JailBreakDetector.h | ||
// JailBreakDetector | ||
// | ||
// Created by Di Wu on 3/9/13. | ||
// Copyright (c) 2013 Di Wu. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface JailBreakDetector : NSObject | ||
|
||
+ (BOOL)isJailBreak; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// JailBreakDetector.m | ||
// JailBreakDetector | ||
// | ||
// Created by Di Wu on 3/9/13. | ||
// Copyright (c) 2013 Di Wu. All rights reserved. | ||
// | ||
|
||
#import "JailBreakDetector.h" | ||
|
||
@implementation JailBreakDetector | ||
|
||
+ (BOOL)isJailBreak | ||
{ | ||
BOOL cydia = NO; | ||
BOOL binBash = NO; | ||
NSString *filePath = @"/Applications/Cydia.app"; | ||
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) | ||
{ | ||
cydia = YES; | ||
} | ||
|
||
FILE * f = fopen("/bin/bash", "r"); | ||
if (f != NULL) | ||
{ | ||
binBash = YES; | ||
} | ||
fclose(f); | ||
|
||
if (cydia || binBash) { | ||
return YES; | ||
} else { | ||
return NO; | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# iOS Jailbreak Detector | ||
|
||
|
||
## Overview | ||
|
||
A drop-in class that dynamically detects whether the iOS device your app is running on has been jailbroken or not. | ||
|
||
## 100% App Store Submission Safe. No Private API | ||
|
||
I myself have a few apps using this class to detect jailbreak devices. So far 100% App Store submission safe. | ||
|
||
##License | ||
The code is released under the [MIT License](http://opensource.org/licenses/mit-license.php). | ||
|
||
##Contact | ||
Email: [email protected] | ||
|
||
:) |