ColorSyncProfileInstall(_:_:_:_:)
Installs a profile in the specified domain.
Declaration
func ColorSyncProfileInstall(_ profile: ColorSyncProfile!, _ domain: CFString!, _ subpath: CFString!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> BoolParameters
- profile:
The profile to install.
- domain:
The domain to install into, either Kcolorsyncprofilecomputerdomain or Kcolorsyncprofileuserdomain.
- subpath:
A string created from the file system representation of the path of the file to contain the installed profile.
- error:
On failure, a pointer to an error describing the problem. Optional.
Return Value
true on success, or false in case of error.
Discussion
The domain is either kColorSyncProfileComputerDomain or kColorSyncProfileUserDomain. kColorSyncProfileComputerDomain is for sharing the profiles (from /Library/ColorSync/Profiles). kColorSyncProfileUserDomain is for user custom profiles (installed under the home directory, that is, in ~/Library/ColorSync/Profiles). NULL is the same as kColorSyncProfileUserDomain.
The subpath is the file system representation of the path of the file to contain the installed profile. The function interprets the last component of the path as a file name if it ends with the extension .icc. Otherwise, the function interprets the subpath as the directory path and creates the file name from the profile description tag, appended with the .icc extension.
Using this function requires COLORSYNC_PROFILE_INSTALL_ENTITLEMENT.