aboutsummaryrefslogtreecommitdiffstats
path: root/CopyMailto/AppDelegate.m
diff options
context:
space:
mode:
authorTeddy Wing2018-09-05 20:48:53 +0200
committerTeddy Wing2018-09-05 20:48:53 +0200
commit9d8676896db252f4b6c7364da66947504ee33d3b (patch)
treeb4da2e95ee441e0289f205e4d5833405103b417e /CopyMailto/AppDelegate.m
parent4df36ebdb0889b4c3542f0d6a9ad073feabc9652 (diff)
downloadCopy-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/AppDelegate.m')
-rw-r--r--CopyMailto/AppDelegate.m4
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];
}