Questions tagged [launch-services]

Launch Services is an API on Mac OS X which allows a running application to launch files and documents similarly to the Finder or Dock

Launch Services is an API on Mac OS X which allows a running application to launch files and documents similarly to the Finder or Dock.

From Apple's developer documentation:

54 questions
4
votes
1 answer

List potential applications that could open a file

Is it possible to get a list of applications installed on the users computer that could be used to open a file (in my case an image), similar to the list shown through the Finder's "Open With..." menu?
Harry Jordan
  • 305
  • 2
  • 8
3
votes
0 answers

OSX Yosemite: Launch Services has build path to application rather than run path

I think this is a problem specific to Yosemite because I didn't have any issues in Mavericks (or Mountain Lion before that)... I have an application that I wrote which registers a helper app to run at startup using SMLoginItemSetEnabled. I'm not…
bmatcuk
  • 453
  • 3
  • 10
3
votes
2 answers

With coexisting legacy and modern Mac apps, can't associate bundled documents globally to the modern app(Launch Services?)

Updated 4-9-2013 This is a total repost of my earlier question. As I have learned much more about Launch Services, UTIs and the depreciated creator codes, I feel I can better ask the question from scratch. Problem Description: We have an application…
Miek
  • 1,127
  • 4
  • 20
  • 35
3
votes
1 answer

Is there a way to distinguish app being started by Launch Services at login or by user?

Cocoa app can add themselves to LSSharedFileList's list of login items. This will allow application to be started when user logs in. However, is there a way to tell whether user started the application or the app auto-started at login? This is…
Tony
  • 36,591
  • 10
  • 48
  • 83
2
votes
1 answer

Opening app on macOS 11 Big Sur from JavaFX application randomly fails with kLSNoExecutableErr

We have a desktop JavaFX application (well, TornadoFX) that downloads an archive, extracts another app from it and launches this app with macOS open command. Simplified kotlin code looks like: ProcessBuilder(listOf("open", "/path/to/app.app",…
AbstractVoid
  • 3,583
  • 2
  • 39
  • 39
2
votes
0 answers

Cannot Launch Containing App from Today Widget on Catalina

macOS Catalina 10.15.2 Xcode 11.3 Swift 5 The following code executed in the Widget always returns 'false' in completion: extensionContext?.open(myAppUrl, completionHandler: { (success) in if (!success) { os_log("Failed to open app from…
xnav
  • 21
  • 3
2
votes
1 answer

Enable "Filename was downloaded from the internet..." prompt in Cocoa

I have an app that downloads ZIP files from my server, and can download plugins from other servers. Before being able to open these files, I would like to present one of the classic '"Filename.html" is a (file type) downloaded from the internet. Are…
Tristan
  • 3,058
  • 6
  • 40
  • 68
2
votes
0 answers

OSX LaunchAgent LaunchDaemon Communication over XPC

I'm trying to communicate my xpc service from LaunchDaemon. LaunchDaemon is command line executable and LaunchAgent is xpc service. Initiating my connection from main service(LaunchDaemon) like this: NSXPCConnection * _connectionToService; …
programmer 05
  • 74
  • 1
  • 11
2
votes
1 answer

How do you get the Finder “Kind” for a file, in 2016?

This answer says to use LSCopyKindStringForURL(), which has worked great in the past, but it's marked "deprecated" in OS X v10.11. There's no mention in the API documentation of why it was deprecated. I don't see any mention of Launch Services API…
J. Cocoe
  • 881
  • 1
  • 10
  • 22
2
votes
0 answers

LaunchServices: Failed to create bundleProxy for bundle...?

What does this LaunchServices error message (from Console.app) mean? 2015-12-13 4:57:48.365 PM bird[344]: LaunchServices: Failed to create bundleProxy for bundle com.mowglii.ItsycalApp Background: I wrote a small calendar app that lives in the menu…
sam
  • 3,399
  • 4
  • 36
  • 51
2
votes
0 answers

How to initialize a NSDocument after calling LSLaunchFSRefSpec?

I am working on a document-based application. If I execute this app from the Finder it runs like expected: First the NSApplicationDelegate applicationDidFinishLaunching method is executed. Then the NSPersistentDocument initialization is done. After…
2
votes
0 answers

How to suppress Launch Services alert message on OS X 10.10

I have something like: LSSetDefaultHandlerForURLScheme((__bridge CFStringRef)(urlschemeref), newHandler); Up to OS X 10.9 it worked nicely and set the default URL handler to whatever I had in newHandler. In Yosemite, Apple introduced a "security…
kerma
  • 2,593
  • 2
  • 17
  • 16
2
votes
1 answer

Alternative way to check if application is installed on MAC OS X?

I have been using Launch Services function LSFindApplicationForInfo() to check if an appication is installed. This works fine, except when a user send the application to the trash. This method still finds it in the trash but can't invoke it. Is…
1
vote
0 answers

How to configure a right click menu in the Finder to hidden for some special data type file?

I have created a service for my OS X(10.7.3). And I have configure it in the info.plist like so: NSServices NSMenuItem default
trent.xu
  • 61
  • 1
  • 1
  • 4
1
vote
1 answer

Allowing any type in the Open panel in a document-based application

I'm writing a document-based Mac application that can open any type. My application receives dropped files of any type on its Dock tile successfully, but when I choose Open from the File menu, all files are grayed out. It's the standard Open item…
Peter Hosey
  • 95,783
  • 15
  • 211
  • 370