LSCopyAllHandlersForURLScheme(_:)
Locates app bundle identifiers for apps capable of handling the specified URL scheme.
Declaration
func LSCopyAllHandlersForURLScheme(_ inURLScheme: CFString) -> Unmanaged<CFArray>?Parameters
- inURLScheme:
The URL scheme for which the application bundle identifiers are to be returned.
Return Value
An array containing the application bundle identifiers for applications capable of handling the URL scheme specified by inURLScheme, or NULL if no handlers are available.
In macOS 10.15 and later, the returned array is sorted so that the first element contains the best available application for opening the specified URL scheme. Prior to macOS 10.15, the order of elements in the array was undefined.
Discussion
This function returns all of the application bundle identifiers that are capable of handling the specified URL scheme.
URL handling capability is determined according to the value of the CFBundleURLTypes key in an application’s Info.plist.
Version Notes
Thread-safe since macOS 10.4.
See Also
Deprecated Functions
LSGetHandlerOptionsForContentType(_:)LSSetHandlerOptionsForContentType(_:_:)LSCopyDefaultHandlerForURLScheme(_:)LSGetApplicationForItem(_:_:_:_:)LSGetApplicationForURL(_:_:_:_:)LSGetApplicationForInfo(_:_:_:_:_:_:)LSCopyApplicationForMIMEType(_:_:_:)LSCanRefAcceptItem(_:_:_:_:_:)LSFindApplicationForInfo(_:_:_:_:_:)LSOpenApplication(_:_:)LSOpenItemsWithRole(_:_:_:_:_:_:_:)LSOpenURLsWithRole(_:_:_:_:_:_:)LSOpenFSRef(_:_:)LSOpenFromRefSpec(_:_:)LSCopyItemInfoForRef(_:_:_:)LSCopyItemInfoForURL(_:_:_:)LSCopyDisplayNameForRef(_:_:)LSCopyDisplayNameForURL(_:_:)LSCopyKindStringForRef(_:_:)LSCopyKindStringForURL(_:_:)LSCopyKindStringForTypeInfo(_:_:_:_:)LSCopyKindStringForMIMEType(_:_:)LSCopyItemAttribute(_:_:_:_:)LSCopyItemAttributes(_:_:_:_:)LSGetExtensionInfo(_:_:_:)LSSetExtensionHiddenForRef(_:_:)LSSetExtensionHiddenForURL(_:_:)LSRegisterFSRef(_:_:)