diff options
author | Teddy Wing | 2018-09-05 20:48:53 +0200 |
---|---|---|
committer | Teddy Wing | 2018-09-05 20:48:53 +0200 |
commit | 9d8676896db252f4b6c7364da66947504ee33d3b (patch) | |
tree | b4da2e95ee441e0289f205e4d5833405103b417e /CopyMailto | |
parent | 4df36ebdb0889b4c3542f0d6a9ad073feabc9652 (diff) | |
download | Copy-Mailto-9d8676896db252f4b6c7364da66947504ee33d3b.tar.bz2 |
applicationWillFinishLaunching:: Fix `NSAppleEventManager` registration
Set correct event class and ID. I just picked a couple that seemed
reasomable but it didn't work to open the app based on the URL handler
because of the values I picked.
Use the exact example as a reference from before:
[[NSAppleEventManager sharedAppleEventManager]
setEventHandler:self
andSelector:@selector(handleURLEvent:withReplyEvent:)
forEventClass:kInternetEventClass
andEventID:kAEGetURL];
from Thomas Zoechling
(https://stackoverflow.com/users/100848/thomas-zoechling) on Stack
Overflow:
https://stackoverflow.com/questions/1991072/how-to-handle-with-a-default-url-scheme/1991162#1991162
Diffstat (limited to 'CopyMailto')
-rw-r--r-- | CopyMailto/AppDelegate.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CopyMailto/AppDelegate.m b/CopyMailto/AppDelegate.m index 2cf4fce..213f403 100644 --- a/CopyMailto/AppDelegate.m +++ b/CopyMailto/AppDelegate.m @@ -14,8 +14,8 @@ [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleURLEvent:withReplyEvent:) - forEventClass:kInternetLocationMail - andEventID:kAEOpenApplication]; + forEventClass:kInternetEventClass + andEventID:kAEGetURL]; } |