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
1
vote
0 answers

What triggers an application to be recognized as a valid web browser for macOS Launch Services so as to open web URLs?

What tooling or configuration information (Info.plist options perhaps?) is required for an application in macOS to be detected as a valid web browser that Launch Services will pick up and offer to the system for opening web URLs?
ylluminate
  • 12,102
  • 17
  • 78
  • 152
1
vote
1 answer

Determine if an app is allowed to launch in macOS

Is there a way to programmatically determine whether an app is allowed to be launched in Security & Privacy settings in macOS? I am trying to silently launch an .app that is downloaded from the web from within a Cocoa application, but if the user…
Dmitry Serov
  • 861
  • 11
  • 22
1
vote
1 answer

Find the filename that launched your OS X app

Setting the info of a file you can associate an app with a particular file type so that when clicked the application is launched. My question is how the app can discover the full filename of the file that caused it to be launched.
AhlanM
  • 21
  • 2
1
vote
1 answer

Regex to validate Uniform Type Identifier

Uniform Type Identifiers (UTIs) are the modern method to identify file types on Mac OS X. In Apple's documentation it says: A UTI is defined as a string (CFString) that follows a reverse Domain Name System (DNS) convention. However, the…
svth
  • 1,303
  • 1
  • 14
  • 23
1
vote
0 answers

Register URL scheme handler for all users in mac

I registered a custom URL scheme (myscheme://) for my Cocoa application with the below code: -(void)applicationWillFinishLaunching:(NSNotification *)notification { CFStringRef bundleId = (__bridge CFStringRef)[[NSBundle mainBundle]…
1
vote
2 answers

Modify the `edit` binary in os x to a different editor

On the command line, I can type edit and it will open in TextWrangler, which I haven't used in ages. I'm not sure how the edit binary got there — I use oh-my-zsh, potentially relevant. I wanted to change subl to edit (nicer to…
mhkeller
  • 713
  • 1
  • 8
  • 19
1
vote
0 answers

OS X Yosemite file association working, but not file icon

My problem is very similar to this entry: Mac OS X file association works, but file icon not changed. I'm developing an app with Qt 5.3 that handles files of a specific extension (say .xyz). I only have OS X Yosemite for testing and I managed to get…
1
vote
0 answers

Disabling the dialogs shown when opening an application for the first time on OSX

I am making an app on osx 10.9 using python 2.7. But when it is launched first time, warning comes. You are opening the application MYAPP for the first time. Are you sure you want to open this application? The application is in a folder named…
imp
  • 1,967
  • 2
  • 28
  • 40
1
vote
1 answer

Searching multiple apps with same bundle ID

I am trying to search for applications installed on my mac with a certain bundle ID. I manage to do this using LSFindApplicationForInfo found in this question. The problem I am facing is that I can't figure out how I can search for installed…
Paul Peelen
  • 10,073
  • 15
  • 85
  • 168
0
votes
2 answers

inverse of LSGetApplicationForItem

I am writing a image viewer application, which I need to set as default application for jpeg/gif files. There is an API LSGetApplicationForItem/Info for getting information on what is the default application. But I am not able to find an API where I…
user435739
0
votes
1 answer

How to get filename when using Launch Services

I register my app with: NSString *self_id=[[NSBundle mainBundle] bundleIdentifier]; CFStringRef cfString; cfString = UTTypeCreatePreferredIdentifierForTag( kUTTagClassFilenameExtension, …
0
votes
1 answer

Is 'Launch Services' used to open other apps from current app in MacOS

I have a use case where I want to launch an app from my current app. I followed this link, which used NSWorkspace shared object and its API's to launch the other app. I m able to launch the other app using this shared object. But then I came across…
Vipul Gupta
  • 239
  • 5
0
votes
1 answer

How to verify compatibility of older Xcode on newer MacOS in terminal without opening it

When I was using MacOS 12.5.1, I found out that older version(e.g. 11.3) of Xcodes can't be opened. It's icon became a banned image and can be opened neither by double click nor 'open' cmd in terminal. So I want to know how to verify Xcode in…
GrumpyMelon
  • 303
  • 1
  • 4
  • 10
0
votes
1 answer

All Application URLs for MIME type

Besides LSCopyDefaultApplicationURLForURL there exists LSCopyApplicationURLsForURL to get all applications, not just the default one. If you just want to get default applications for a MIME type, there is LSCopyDefaultApplicationURLForContentType,…
user187676
0
votes
1 answer

macOS `ps` gives bundle identifier instead of path for some XPC services

My macOS app can launch a faceless helper application which is shipped in its Contents/Library/LoginItems using Apple's Service Management Framework, as described in Apple documentation. Funny thing is, when I request the unix ps program to give me…
Jerry Krinock
  • 4,860
  • 33
  • 39