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
// iOS 9 allows you to animate between visual effects, which gives you the | |
// ability to manipulate the blur radius. this can be useful for animating | |
// a backdrop for a custom modal, and with a few tricks, can even be set | |
// indirectly, allowing you to "scrub" between them back and forth with | |
// a gesture, just like when you pull down Spotlight. | |
// these are the two effects you want to transition between | |
UIVisualEffect *startEffect = nil; // "nil" means no blur/tint/vibrancy (plain, fully-transparent view) | |
UIVisualEffect *endEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; |
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
## within current branch, squashes all commits that are ahead of master down into one | |
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case) | |
## commit any working changes on branch "mybranchname", then... | |
git checkout master | |
git checkout -b mybranchname_temp | |
git merge --squash mybranchname | |
git commit -am "Message describing all squashed commits" | |
git branch -m mybranchname mybranchname_unsquashed | |
git branch -m mybranchname |
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
// declaring the function pointer | |
int *(*cool_function_pointer)(int, char, float); | |
// ^ ^ ^ ^ | |
// function's retval function parameters | |
// getting a pointer to the function | |
*(void **)(&cool_function_pointer) = dlsym(RTLD_DEFAULT, "cool_function_name"); | |
// ^ ^ ^ | |
// always void means "get func from hooked process" name of function in the binary (should appear as string in dasm) |
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
static NSString *test; | |
%hook SpringBoard | |
-(id)init { | |
id obj = %orig; | |
test = @"i'm from springboard"; | |
return obj; | |
} | |
%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
static NSString* pathForUserApplicationWithIdentifier(NSString* bundleIdentifier) | |
{ | |
NSFileManager* manager = [[[NSFileManager alloc] init] autorelease]; | |
NSArray* paths = [manager subpathsOfDirectoryAtPath:@"/var/mobile/Applications" error:nil]; | |
for(NSString* path in paths) | |
{ | |
NSDictionary* metadata = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"%@/iTunesMetadata.plist]]; | |
NSString* candidateID = [metadata objectForKey:@"softareVersionBundleId"]; | |
if([candidateID isEqualToString:bundleIdentifier]) | |
return path; |
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
-(BOOL)appIsCracked | |
{ | |
BOOL cracked = NO; | |
NSString* bundlePath = [[NSBundle mainBundle] bundlePath]; | |
NSString* resourcePath = [[NSBundle mainBundle] resourcePath]; | |
NSFileManager* fileManager = [NSFileManager defaultManager]; | |
NSDictionary* iTunesMetadata = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"%@/iTunesMetadata.plist", bundlePath]]; | |
if([(NSString*)[iTunesMetadata objectForKey:@"appleId"] isEqualToString:@"[email protected]"]) |