Hi All,
I’d like to know if there’s a way to change the default mailto: URL handler in OS X. I know how to do this for http in Objective-C, but simply switching out http: with mailto: doesn’t seem to work. Thanks in advance.
p.s. I’m looking for a sandbox-compliant way of doing this
Obj-C code I have for changing http handler:
CFStringRef browserBundleID = (__bridge CFStringRef)@"com.google.chrome";
LSSetDefaultHandlerForURLScheme(CFSTR("http"), browserBundleID);
NSAppleEventManager *em = [NSAppleEventManager sharedAppleEventManager];
[em
setEventHandler:self
andSelector:@selector(getUrl:withReplyEvent:)
forEventClass:kInternetEventClass
andEventID:kAEGetURL];