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
34
votes
3 answers

Why is my iOS app not showing up in other apps' "Open in" dialog?

I am trying to implement the registering process that allows my iOS app to show up in the "Open in" list of other applications (as described in Apple's Document Interaction Programming Topics). I want my app to be able to handle audio from any app…
user577537
32
votes
4 answers

Set default web browser via command line?

I'm trying to figure out how to set the default web browser on OS X via command line. I found this forum post, but the solution they are working out there is to open a specific URL with a specific application. I am looking for a way to set the…
Zettt
  • 879
  • 2
  • 8
  • 27
19
votes
1 answer

When an OS X app is launched by a registered URL scheme, how do you access the full URL?

I'm working on an Cocoa app which is launched/activated using URLs with a custom scheme which is registered in the Info.plist file like so: CFBundleURLTypes CFBundleURLName Open…
phatblat
  • 3,804
  • 3
  • 33
  • 31
13
votes
1 answer

Can you dynamically assign CFBundleDocumentTypes to your Cocoa application?

Can you dynamically assign CFBundleDocumentTypes to your Cocoa application? Meaning during run time can I assign more extensions for my app to handle. Currently I set some extensions for my app to handle using CFBundleDocumentTypes in the…
12
votes
4 answers

Open URL with Safari no matter what system browser is set to

In my objective-c program, I need to open a URL in Safari no matter what the system's default browser is. That means that this won't work, because it could launch Firefox or whatever other browser: NSWorkspace * ws = [NSWorkspace…
Mark
  • 343
  • 1
  • 4
  • 13
9
votes
3 answers

Enumerate All Installed Applications on OS X

Basic problem I'm looking for a solution to enumerate all applications installed on a (Mac) OS X system, i.e. all application bundles registered with LaunchServices. Simple approach that did not work (Please note: lsregister can be found under…
Johannes Weiss
  • 52,533
  • 16
  • 102
  • 136
8
votes
0 answers

iOS app which handles URLs is not showing up in "Open in..." menu (eg. in Safari)

When clicking the 'share' button in iOS Safari (either from the toolbar, or by long-pressing a link), I would like my app to be visible as an "Open in..." option (eg. "Open in News"), so that my app – which is another type of web browser – can open…
Jamie Birch
  • 5,839
  • 1
  • 46
  • 60
8
votes
1 answer

Mac OS X file association works, but file icon not changed

I have developed a Mac application using Qt 5.3.2. This application handles files with specific extension (lets say .xyz). I have created an icon file named XYZ.icns and added it to my app bundle Resource folder…
gfrigon
  • 2,237
  • 2
  • 23
  • 32
7
votes
3 answers

How to find multiple apps with same bundle identifier?

Does anyone know of a good way to find (in the filesystem) every app with a given bundle identifier? NSWorkspace and Launch Services let you look for an app by bundle identifier, but only return a single result. I suspect Spotlight (NSMetadataQuery)…
rickster
  • 124,678
  • 26
  • 272
  • 326
7
votes
2 answers

Given a UTI (Uniform Type Identifier), find all types to which it conforms

I am writing an application that makes use of Uniform Type Identifiers. Specifically, I am calling UTTypeCreateAllIdentifiersForTag() and passing it various MIME types. My hope was that this function (as distinct from…
Aidan Steele
  • 10,999
  • 6
  • 38
  • 59
5
votes
3 answers

Setting default application for given file extension on Mac OS X from code

I have the list of the applications for given file extension (using LSCopyApplicationURLsForURL). I want to change the default file association from code upon selecting one of the applications from the above call. Is there a way to do this?
bela.bartha
  • 122
  • 1
  • 9
5
votes
1 answer

What exactly should I pass to -[NSApp activateIgnoringOtherApps:] to get my application to start "naturally" in comparison to most other OS X apps?

When I learned how to start NSApplications on my own, the code I used (based on here and here) did [NSApp activateIgnoringOtherApps:YES]; which forces the app to the front at startup. I'd like to know what most other apps do. I want to be able to…
andlabs
  • 11,290
  • 1
  • 31
  • 52
4
votes
0 answers

OSX App - Associated file types and icons not updating (Launch Services)

I have a mac app that will open ".png" file types. I am able to get the application to make itself the default app that opens ".png" files and double clicking the files will launch my app. However, I can't seem to update the icon on .png files - it…
Andy Hin
  • 30,345
  • 42
  • 99
  • 142
4
votes
1 answer

What is the difference between launching a Mac OS X app via the Finder/open and executing the app binary directly?

I'm experiencing an issue with a Qt app on Mac OS X 10.10.5, whereby a QFileDialog will not close properly when canceled. While this may be a bug in Qt, I only see this bug when running the app as a normal user would, e.g. opening it in the Finder…
Dan
  • 1,258
  • 1
  • 10
  • 22
4
votes
1 answer

Remove A URL Scheme Handler from Launch Services

I am developing a Cocoa Mac app which dynamically generates and registers itself for URL schemes. However, when the application registers itself to handle a newly generated URL scheme (e.g. myscheme1423://), I would like to prevent the application…
Alex Nichol
  • 7,512
  • 4
  • 32
  • 30
1
2 3 4