Questions tagged [nsappleeventmanager]

Provides a mechanism for registering handler routines for specific types of Apple events and dispatching events to those handlers.

Provides a mechanism for registering handler routines for specific types of Apple events and dispatching events to those handlers.

Complete Class Reference

5 questions
5
votes
1 answer

Replying to an Apple Event in Cocoa

I'm registering an Apple Event handler using NSAppleEventManager: [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass…
Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
2
votes
2 answers

Creating an AppleEvent descriptor for an alias in OS X 10.8

I have the following code in a project NSAppleEventDescriptor *JHCreateAliasDescriptorForURL(NSURL *aURL) { NSAppleEventDescriptor *retObj = nil; FSRef fsReference; if (CFURLGetFSRef((__bridge CFURLRef)aURL, &fsReference)) { …
iluvcapra
  • 9,436
  • 2
  • 30
  • 32
1
vote
1 answer

NSAppleEventManager.shared().setEventHandler steal the focus

When register for url activation in my app with NSAppleEventManager.shared().setEventHandler(self, andSelector: #selector(self.handleEvent(_:with:)), forEventClass: AEEventClass(kInternetEventClass), andEventID: AEEventID(kAEGetURL)) I'm getting…
0
votes
0 answers

How to detect URL schemes with .handlesExternalEvents and NSAppleEventManager simultaneously

I have a SwiftUI-based Mac app with multiple WindowGroups. 1. Opening different SwiftUI WindowGroups using URL schemes To open those windows I am using URL schemes (like described here): WindowGroup { // ... } .handlesExternalEvents(matching:…
0
votes
1 answer

NSAPP Custom URL Handling

I am developing an application for OSX and have to handle custom URL handling in my application Open My profile! While Application is Running I am able to get event inside -…