• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CFPreferences calls in Cocoa apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFPreferences calls in Cocoa apps


  • Subject: Re: CFPreferences calls in Cocoa apps
  • From: Chris Parker <email@hidden>
  • Date: Thu, 18 Nov 2004 09:27:55 -0800

Hi Tom,

On Nov 18, 2004, at 9:18 AM, Thomas Davie wrote:

I'm writing what is at heart a cocoa application, but needs to make a few Core Foundation Preferences calls, specifically it needs to grab the preferences for another application. I have been trying to use CFPreferencesCopyKeyList to grab the preferences, but it apparently always returns nil (at least within a cocoa app). Considering what might be causing this, I decided to try synchronizing the preferences first using CFPreferencesAppSynchronize, this unfortunately causes a SIGABRT... Does anyone have any idea why this happens?

Without seeing a backtrace, no. :)

You should be fine calling CFPreferences API from within a Cocoa application, and changes made in this way will be picked up by NSUserDefaults.

If you're looking for a specific key within the other application's preferences you should just be able to call

	somePlistRef = CFPreferencesCopyAppValue(theKey, theAppBundleID);

and be able to retrieve that key.

I believe CFPreferencesCopyKeyList should work, but if it doesn't please file a bug.

.chris

--
Chris Parker
Cocoa Frameworks
Apple, Inc.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >CFPreferences calls in Cocoa apps (From: Thomas Davie <email@hidden>)

  • Prev by Date: CFPreferences calls in Cocoa apps
  • Next by Date: NSImage question
  • Previous by thread: CFPreferences calls in Cocoa apps
  • Next by thread: Re: CFPreferences calls in Cocoa apps
  • Index(es):
    • Date
    • Thread