Skip to content

Instantly share code, notes, and snippets.

@n00neimp0rtant
Created January 13, 2014 16:47
Show Gist options
  • Save n00neimp0rtant/8403581 to your computer and use it in GitHub Desktop.
Save n00neimp0rtant/8403581 to your computer and use it in GitHub Desktop.
static NSString *test;
%hook SpringBoard
-(id)init {
id obj = %orig;
test = @"i'm from springboard";
return obj;
}
%end
%hook MyAppStoreApp
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if (test != nil && [test isEqualToString:@"i'm from springboard"]) {
NSLog(@"i can access SB's static var");
} else {
NSLog(@"i cannot access SB's static var");
}
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment