---
title: CMUpdateProfile
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/colorsync_manager/1804864-cmupdateprofile
---

# CMUpdateProfile

Saves modifications to the specified profile.

## Declaration

```occ
CMError CMUpdateProfile (
   CMProfileRef prof
);
```

## Parameters

- `prof`: A profile reference of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileref](applicationservices/cmprofileref.md) to the profile to update.

## Return Value

A `CMError` value. See [Result Codes](../colorsync_manager.md).

## Overview

The `CMUpdateProfile` function makes permanent any changes or additions your application has made to the profile identified by the profile reference, if no other references to that profile exist.

The ColorSync Manager maintains a modified flag to track whether a profile has been modified. After updating a profile, the `CMUpdateProfile` function sets the value of the modified flag for that profile to `false`.

Each time an application calls the function [CMOpenProfile](1804853-cmopenprofile.md), the function creates a unique reference to the profile. An application can also duplicate a profile reference by passing a copy to another task. You cannot use the `CMUpdateProfile` function to update a profile if more than one reference to the profile exists—attempting to do so will result in an error return. You can call the function [CMGetProfileRefCount](1804894-cmgetprofilerefcount.md) to determine the reference count for a profile reference.

You cannot use the `CMUpdateProfile` function to update a ColorSync 1.0 profile. 

After you fill in tags and their data elements for a new profile created by calling the function [CMNewProfile](1804911-cmnewprofile.md), you must call the `CMUpdateProfile` function to write the element data to the new profile.

If you modify an open profile, you must call `CMUpdateProfile` to save the changes to the profile file before you call the function [CMCloseProfile](1804861-cmcloseprofile.md). Otherwise, the changes are discarded.

To modify a profile header, you use the function [CMGetProfileHeader](1804879-cmgetprofileheader.md) and the function [CMSetProfileHeader](1804882-cmsetprofileheader.md).

To set profile elements outside the header, you use the function [CMSetProfileElement](1804977-cmsetprofileelement.md), the function [CMSetProfileElementSize](1804980-cmsetprofileelementsize.md), and the function [CMSetPartialProfileElement](1804989-cmsetpartialprofileelement.md). 

## See Also

### Accessing Profiles

- [CMOpenProfile](1804853-cmopenprofile.md)
- [CMValidateProfile](1804856-cmvalidateprofile.md)
- [CMCloseProfile](1804861-cmcloseprofile.md)
- [CMCopyProfile](1804870-cmcopyprofile.md)
- [CMProfileModified](1804872-cmprofilemodified.md)
- [CMGetProfileMD5](1804876-cmgetprofilemd5.md)
- [CMGetProfileHeader](1804879-cmgetprofileheader.md)
- [CMSetProfileHeader](1804882-cmsetprofileheader.md)
- [CMGetProfileLocation](1804885-cmgetprofilelocation.md)
- [NCMGetProfileLocation](1804889-ncmgetprofilelocation.md)
- [CMCloneProfileRef](1804891-cmcloneprofileref.md)
- [CMGetProfileRefCount](1804894-cmgetprofilerefcount.md)
- [CMFlattenProfile](1804897-cmflattenprofile.md)
- [NCMUnflattenProfile](1804901-ncmunflattenprofile.md)
