Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

iOS 13: systemAppearanceChanged-event is called twice when user suspends app (without any darkmode change) #8411

Copy link
Copy link
Open
@felixkrautschuk

Description

@felixkrautschuk
Issue body actions

Environment

  • CLI: 6.4.2
  • Cross-platform modules: @nativescript/core 6.4.2
  • Android Runtime: -
  • iOS Runtime: 6.4.2
  • Plugin(s): -

Describe the bug
When you suspend the NativeScript app on an iOS 13 device/simulator, the suspend-event will be triggered as expected, but then thesystemAppearanceChanged event will be triggered twice, one time with the opposite of the current dark-mode setting, and then with the current setting of darkmode.
That happens even if the user made no changes in the dark mode settings of the device.

This issue does not occur on Android devices and iOS 12. Only the suspend-Event gets triggered on those devices, as expected.

ios13_systemappearance_issue

To Reproduce
1.) Start the demo app provided below on a
2.) suspend the app and you will see some logs in the console:

suspendEvent
systemAppearanceChangedEvent: dark
systemAppearanceChangedEvent: light

If the dark mode is activated on the iOS 13 device bevore suspending the app, then the 2nd and the 3rd log come in reversed order.

Expected behavior
The systemAppearanceChanged event should not be triggered at all in this scenario (only the suspend-Event should be triggered).

Sample project
NSSystemAppearanceIssueIOS.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.