NativeScript / NativeScript/NativeScript
iOS 13: systemAppearanceChanged-event is called twice when user suspends app (without any darkmode change)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.7k
- Forks
- 1.7k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 35
Description
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.

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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached NSSystemAppearanceIssueIOS.zip sample project and reproduce the suspend sequence on an iOS 13 device or simulator. Compare the suspend and systemAppearanceChanged logs with the expected behavior: suspending without a dark-mode change should trigger only the suspend event.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100