Giter Club home page Giter Club logo

Comments (2)

albertosottile avatar albertosottile commented on June 11, 2024 1

As expected, I was doing something wrong, but not in rubicon-objc at least. It turns out that the key is set only when the Dark mode is enabled, and unset when the usual Light mode is enabled.

Repeating the test with pyobjc did not show the key either, so I figured out the problem. Setting the theme back to Dark and running rubicon-objc again correctly gives:

>>> NSUserDefaults.standardUserDefaults.stringForKey('AppleInterfaceStyle') <rubicon.objc.collections.ObjCStrInstance 0x10ffce198: NSTaggedPointerString at 0x5d9715df945086a3: Dark>

Thanks for your help.

from rubicon-objc.

dgelessus avatar dgelessus commented on June 11, 2024

Interesting. I haven't updated to macOS 10.14 yet, so I can't test this specific key, but I can look up other system defaults:

>>> NSUserDefaults.standardUserDefaults.stringForKey("AppleMeasurementUnits")
<rubicon.objc.collections.ObjCStrInstance 0x110073240: __NSCFString at 0x7faa9c0c6820: Centimeters>

Do other defaults keys work for you with Rubicon, or are all of them broken? If you look at NSUserDefaults.standardUserDefaults.dictionaryRepresentation() using Rubicon, do you see the AppleInterfaceStyle key in that dictionary?

from rubicon-objc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.