Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 215353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:27:45+00:00 2026-05-11T18:27:45+00:00

I have existing code that uses CMNewProfileSearch to find then iterate over the color

  • 0

I have existing code that uses CMNewProfileSearch to find then iterate over the color profiles on the system getting their names and full paths. Unfortunately, CMNewProfileSearch is deprecated in Mac OS X 10.5 and is also unavailable when compiling a 64-bit application.

In reading the ColorSync Manager 2.5 Reference, it seems like the new way to iterate over installed color profiles is to use the CMIterateColorSyncFolder function.

  1. Is that true?
  2. Is there a Cocoa way to do what I want instead?
  3. Anybody got any sample code?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:27:45+00:00Added an answer on May 11, 2026 at 6:27 pm
    1. Yes. As you indicated, the ColorSync Manager Reference says the following:

      The CMNewProfileSearch function does not take full advantage of the optimized profile
      searching available starting with ColorSync version 2.5. Use CMIterateColorSyncFolder
      instead.

    2. CMIterateColorSyncFolder is the official way to do this. Besides, it’s also the optimized way.

    3. From Apple’s ImageApp sample code:

    EDIT: I’ve modified the code sample to remove NewCMProfileIterateUPP and DisposeCMProfileIterateUPP.

    
        // Callback routine with a description of a profile that is 
        // called during an iteration through the available profiles.
        //
        static OSErr profileIterate (CMProfileIterateData *info, void *refCon)
        {
            NSMutableArray* array = (NSMutableArray*) refCon;
    
            Profile* prof = [Profile profileWithIterateData:info];
            if (prof)
                [array addObject:prof];
    
            return noErr;
        }
    
        // return an array of all profiles
        //
        + (NSArray*) arrayOfAllProfiles
        {
            NSMutableArray* profs=[[NSMutableArray arrayWithCapacity:0] retain];
            CMIterateColorSyncFolder(profileIterate, NULL, 0L, profs);
            return (NSArray*)profs;
        }
    

    It turns out that don’t need NewCMProfileIterateUPP and DisposeCMProfileIterateUPP so they haven’t been replaced with anything, as far as I can tell. Instead, you can define the callback function with a signature that matches profileIterate, above. You can then just pass the callback function directly to CMIterateColorSyncFolder.

    I’ve tested my changes in ImageApp on Mac OS X 10.5 it it works as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing website that uses the same code base, but is deployed
I have an existing Rails 2.3.x application that uses the follow block of code
I have existing code for an ASP .NET application that uses reflection to load
I have a lot of existing code that just uses the normal dateTime class
I have some existing code that uses an enum instead of a function pointer
I have some existing C code that uses ICMP raw sockets to do Ping
I have some existing code that worked fine under Windows 2003, to obtain the
I have an existing code base that is not packaged at all. The code
I have existing java code and need to create Design Document based on that.
I have an existing database based on SQLiteOpenHelper that has several versions and code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.