---
title: "LSCopyKindStringForURL(_:_:)"
framework: coreservices
role: symbol
role_heading: Function
path: coreservices/1447481-lscopykindstringforurl
---

# LSCopyKindStringForURL(_:_:)

Obtains the kind string for an item with a URL.

## Declaration

```swift
func LSCopyKindStringForURL(_ inURL: CFURL!, _ outKindString: UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatus
```

## Parameters

- `inURL`: A Core Foundation URL reference designating the item whose kind string is requested; see the CFURL Reference in the Core Foundation Reference Documentation for a description of the CFURLRef data type.
- `outKindString`: A pointer to a Core Foundation string object that, on return, will contain the item’s kind string; see the CFString Reference in the Core Foundation Reference Documentation for a description of the CFStringRef data type. You are responsible for releasing this object.

## Return Value

Return Value A result code; see Result Codes.

## Discussion

Discussion The kind string (which may be localized) is obtained from the item’s preferred application, if one is found in the Launch Services database; otherwise, a more generic kind string is chosen. For example, the kind string might be FrameMakerDocument, or just Document if the item is a document for which no application is found. If the item URL’s scheme is file (designating either a file or a directory), the selection of the preferred application is based on the designated item’s filename extension, file type, and creator signature; otherwise, it is based on the URL scheme (such as http, ftp, or mailto). Version-Notes Thread-safe since Mac OS version 10.2.

## See Also

### Deprecated Functions

- [LSGetHandlerOptionsForContentType(_:)](coreservices/1445296-lsgethandleroptionsforcontenttyp.md)
- [LSSetHandlerOptionsForContentType(_:_:)](coreservices/1447588-lssethandleroptionsforcontenttyp.md)
- [LSCopyAllHandlersForURLScheme(_:)](coreservices/1443240-lscopyallhandlersforurlscheme.md)
- [LSCopyDefaultHandlerForURLScheme(_:)](coreservices/1441725-lscopydefaulthandlerforurlscheme.md)
- [LSGetApplicationForItem(_:_:_:_:)](coreservices/1446185-lsgetapplicationforitem.md)
- [LSGetApplicationForURL(_:_:_:_:)](coreservices/1445210-lsgetapplicationforurl.md)
- [LSGetApplicationForInfo(_:_:_:_:_:_:)](coreservices/1449928-lsgetapplicationforinfo.md)
- [LSCopyApplicationForMIMEType(_:_:_:)](coreservices/1448586-lscopyapplicationformimetype.md)
- [LSCanRefAcceptItem(_:_:_:_:_:)](coreservices/1442183-lscanrefacceptitem.md)
- [LSFindApplicationForInfo(_:_:_:_:_:)](coreservices/1449588-lsfindapplicationforinfo.md)
- [LSOpenApplication(_:_:)](coreservices/1447930-lsopenapplication.md)
- [LSOpenItemsWithRole(_:_:_:_:_:_:_:)](coreservices/1449783-lsopenitemswithrole.md)
- [LSOpenURLsWithRole(_:_:_:_:_:_:)](coreservices/1448184-lsopenurlswithrole.md)
- [LSOpenFSRef(_:_:)](coreservices/1445663-lsopenfsref.md)
- [LSOpenFromRefSpec(_:_:)](coreservices/1444466-lsopenfromrefspec.md)
- [LSCopyItemInfoForRef(_:_:_:)](coreservices/1445227-lscopyiteminfoforref.md)
- [LSCopyItemInfoForURL(_:_:_:)](coreservices/1445685-lscopyiteminfoforurl.md)
- [LSCopyDisplayNameForRef(_:_:)](coreservices/1442576-lscopydisplaynameforref.md)
- [LSCopyDisplayNameForURL(_:_:)](coreservices/1446850-lscopydisplaynameforurl.md)
- [LSCopyKindStringForRef(_:_:)](coreservices/1448593-lscopykindstringforref.md)
- [LSCopyKindStringForTypeInfo(_:_:_:_:)](coreservices/1446207-lscopykindstringfortypeinfo.md)
- [LSCopyKindStringForMIMEType(_:_:)](coreservices/1442446-lscopykindstringformimetype.md)
- [LSCopyItemAttribute(_:_:_:_:)](coreservices/1445023-lscopyitemattribute.md)
- [LSCopyItemAttributes(_:_:_:_:)](coreservices/1446078-lscopyitemattributes.md)
- [LSGetExtensionInfo(_:_:_:)](coreservices/1446043-lsgetextensioninfo.md)
- [LSSetExtensionHiddenForRef(_:_:)](coreservices/1442766-lssetextensionhiddenforref.md)
- [LSSetExtensionHiddenForURL(_:_:)](coreservices/1443948-lssetextensionhiddenforurl.md)
- [LSRegisterFSRef(_:_:)](coreservices/1444582-lsregisterfsref.md)
