I am working on a widget for my existing Mac app. The problem I am running into is that when I add a Link from the widget to the main app, the method ...
I am working on a widget for my existing Mac app. The problem I am running into is that when I add a Link from the widget to the main app, the method ...
I want to do some stuff when an application terminates, so I added applicationShouldTerminate: and applicationWillTerminate methods to my AppDelegate. ...
I have a basic NSDocument-based app. I need to make one last change to the document when: The user closes the document's window The user termina ...
NSWorkspace has the method open(_:withAppBundleIdentifier: [...] ): Opens one or more files from an array of URLs. The NSApplicationDelegat ...
Is there any way for a Cocoa application to detect when the user has tried to quit it via its Dock menu, and not by some other method? Normally it's ...
I implemented the NSApplicationDelegate method func application(_ sender: NSApplication, openFile filename: String) -> Bool to get the name of the ...
In a simple rtf editor —based on NSDocument subclass—, when app starts, it creates an untitled file. This a desirable behaviour. But if I quit the app ...
I would like to handle open events when a user double-clicks on a file that was created by my application, or drags such a file onto the dock icon. I ...
I'm working on a Mac OS X service that is managed as a launch daemon. It does not have any GUI, but it is structured as a Cocoa app run with NSApplica ...
I've been trying to play with Swift 3, but I am unable to get started. The following code is compiling, however it does not log anything. Looks like a ...
I have a Mac OS X application that implements the -(void)application openFiles: method to react to dragged files on the application icon. I have a li ...
I am working on a document-based application for Mac. This application has its own data model and methods for writing and reading such kind of documen ...
I'm noticing something strange in my NSApplication delegate callbacks. When I start the app with debugger attached, I see what I expect: applicationDi ...
I am currently programming an application using glfw in MacOS X. My only problem is that the application doesn't use an AppDelegate, but does all the ...
The sample menu bar app is a agent as its LSUIElement is TRUE. I want to prevent logout on certain conditions. I tried with - (NSApplicationTerminat ...
I just ran myself round in circles, all coming down to having instantiated an app delegate object in a secondary NIB that wasn't the NSMainNibFile. Am ...
I am developing an application for OSX and have to handle custom URL handling in my application While Application is Running I am able to get even ...
Can any one help me in resolving this crash. This happens when the App is quit but not always. Some times i get the following crash logs when it is ...
I want to open a file dropping it on the app icon. When I do it my app is opened so the file extension is well defined and related to my app. But the ...
In my app i have the following setup : The applicationDidBecomeActive never gets called for some reason. Does anyone know I'm missing here?! ...