Created
December 12, 2011 11:06
-
-
Save chamerling/1466628 to your computer and use it in GitHub Desktop.
OS X URL handler
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
- (void)registerURLHandler:(id) sender | |
{ | |
NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier]; | |
OSStatus httpResult = LSSetDefaultHandlerForURLScheme((CFStringRef)@"quickhubapp", (CFStringRef)bundleID); | |
NSLog(@"Result : %@", httpResult); | |
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(getUrl:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment