Contents

LSSetDefaultRoleHandlerForContentType(_:_:_:)

Sets the user’s preferred default handler for the specified content type in the specified roles.

Declaration

func LSSetDefaultRoleHandlerForContentType(_ inContentType: CFString, _ inRole: LSRolesMask, _ inHandlerBundleID: CFString) -> OSStatus

Parameters

  • inContentType:

    The content type for which the default role handler is being set. The content type is a uniform type identifier.

  • inRole:

    The roles for which the default role handler is being set. Pass kLSRolesAll to specify all roles. For additional possible values, see Lsrolesmask.

  • inHandlerBundleID:

    The bundle identifier that is to be set as the default handler for the specified content type and roles.

Return Value

A result code; see Result Codes.

Discussion

Call LSCopyDefaultRoleHandlerForContentType(_:_:) to get the current setting of the user’s preferred default handler for a specified content type.

Version-Notes

Thread-safe since OS X v10.4.

See Also

Working with Role Handlers