Today widget supporting dark theme

I hope this was the right sub forum for this question.


Is there anywhere some documentation on how to support the dark theme with today widgets? My app supported theming before and it was easy to implement a switch for the theme in it through


traitCollection.userInterfaceStyle


which is also available within the today widget (or at least it seems so). But how can we set the today widget background based on that? Or is there some flag to show that the widget is ready for the dark theme so that the OS will handle this on it's own?

Could this help you ?

h ttps://forums.macrumors.com/threads/answered-developer-question-get-today-extension-to-support-dark-mode.2122686/

Thanks for your response. Based on that, it should be enough to add


NSExtensionPointVersion


with value "3.0" to the Info.plist (this key wasn't there before at all) but this didn't change anything. Do I also have to compile with XCode 11 for this to work? Because the normal iOS App Dark Theme did worked without it just by querying the UI Style.

Today widget supporting dark theme
 
 
Q