(ANSWERED) Developer question: get Today Extension to support dark mode

Discussion in 'macOS Mojave (10.14)' started by tkermit, Jun 10, 2018.

  1. tkermit, Jun 10, 2018
    Last edited: Jun 10, 2018

    tkermit macrumors 68040

    tkermit

    Joined:
    Feb 20, 2004
    #1
    Does anyone know what you're supposed to do to have the view from a Today extension automatically switch to the dark appearance when necessary or what would prevent it from doing so?

    It works just fine in the Widget Simulator where my widget switches just like it's supposed to between the two appearances which leads me to believe there's nothing needed to be changed in code. I've also had no issues with other views in my UI automatically adapting their appearance. But the widget in Notification Center prefers to permanently display itself in Vibrant Light instead.
    --- Post Merged, Jun 10, 2018 ---

    edit:

    lol, ok, figured it out. For the benefit of anyone else wondering:

    You have to change the value for NSExtensionPointVersion in your extension's info.plist from 2.0 to 3.0
     
  2. cambookpro macrumors 603

    cambookpro

    Joined:
    Feb 3, 2010
    Location:
    United Kingdom
  3. BookEmDanno macrumors 6502

    BookEmDanno

    Joined:
    Nov 9, 2010
    Location:
    State of ~Aloha!~
    #3
    Whose info.plist is the extension belong to, or rather can you give me the full path to the info.plist that I can edit?

    ~Mahalo!~
     
  4. tkermit thread starter macrumors 68040

    tkermit

    Joined:
    Feb 20, 2004
    #4
    Not sure I understand the first part of your question. The path can depend. It might be easiest to edit the contents of your info.plist by selecting the extension target in your project and switching to the info view.

    edit: Note that this is for your own Xcode projects only. It probably won't work to simply change the value in the plist of an extension of some other compiled app you're using.
     
  5. BookEmDanno macrumors 6502

    BookEmDanno

    Joined:
    Nov 9, 2010
    Location:
    State of ~Aloha!~
    #5
    Got it. I'm a developer and using Xcode but currently not developing any Mojave based apps.

    Mahalo (thanks) for the response.
     

Share This Page