Skip to content

Instantly share code, notes, and snippets.

@rentzsch
Created February 1, 2009 18:11
Show Gist options
  • Save rentzsch/55929 to your computer and use it in GitHub Desktop.
Save rentzsch/55929 to your computer and use it in GitHub Desktop.
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);
//=> ClickToFlash: updater: SUUpdater </Users/wolf/Library/Internet Plug-Ins/ClickToFlash.plugin>
[updater checkForUpdates:nil];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment