• 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: Programmatically change screen saver settings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically change screen saver settings


  • Subject: Re: Programmatically change screen saver settings
  • From: Graham Cox <email@hidden>
  • Date: Sun, 01 Mar 2015 12:14:57 +1100

> On 1 Mar 2015, at 12:46 am, Juanjo Conti <email@hidden> wrote:
>
> This settings are not accesibles via NSUserDefaults but they are via CF.
>
> I was able to do this by code
>
> var moduleDict = CFPreferencesCopyAppValue("moduleDict",
> "com.apple.screensaver") as CFDictionary
>
> but when I try to get one value from that "dict" the program crash in this
> line:
>
> var saverName = CFDictionaryGetValue(moduleDict, "moduleName")
>


You're trying to use a C string as a key, not a CFString. Try @"moduleDict" instead.


--Graham



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Programmatically change screen saver settings
      • From: Juanjo Conti <email@hidden>
References: 
 >Programmatically change screen saver settings (From: Juanjo Conti <email@hidden>)

  • Prev by Date: Re: Error migrating: "Unacceptable type of value for attribute"
  • Next by Date: Re: Programmatically change screen saver settings
  • Previous by thread: Programmatically change screen saver settings
  • Next by thread: Re: Programmatically change screen saver settings
  • Index(es):
    • Date
    • Thread