Skip to content

Instantly share code, notes, and snippets.

View gist:55930
NSString *currentProcessBundleID = [[NSBundle mainBundle] bundleIdentifier];
NSLog(@"ClickToFlash: currentProcessBundleID: %@ %d", currentProcessBundleID, [currentProcessBundleID isEqualToString:@"com.apple.Safari"]);
//=> ClickToFlash: currentProcessBundleID: com.apple.Safari 1
if ([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Safari"]) {
NSLog(@"ClickToFlash: bundleForClass self: %@", [[NSBundle bundleForClass:[self class]] bundleIdentifier]);
//=> ClickToFlash: bundleForClass self: com.github.rentzsch.clicktoflash
static SUUpdater *updater = nil;
if (!updater) {
updater = [SUUpdater updaterForBundle:[NSBundle bundleForClass:[self class]]];
NSLog(@"ClickToFlash: updater: %@", updater);