Skip to content

iOS: resumeEvent and suspendEvent are triggered twice after adding UIScene-support #11268

Description

@felixkrautschuk

Issue Description

I followed the following guide to add UIScene support to our NativeScript app for iOS (nativescript/core 9.0.20, nativescript/ios 9.0.3):
https://nstudio.io/blog/ios-adopt-uiscene-now-with-nativescript

So I added the following to App_Resources/iOS/Info.plist

<key>UIApplicationSceneManifest</key>
<dict>
        <key>UIApplicationPreferredDefaultSceneSessionRole</key>
        <string>UIWindowSceneSessionRoleApplication</string>
        <key>UIApplicationSupportsMultipleScenes</key>
        <true/>
        <key>UISceneConfigurations</key>
        <dict>
            <key>UIWindowSceneSessionRoleApplication</key>
            <array>
                <dict>
                    <key>UISceneConfigurationName</key>
                    <string>Default Configuration</string>
                    <key>UISceneDelegateClassName</key>
                    <string>SceneDelegate</string>
                </dict>
            </array>
        </dict>
</dict>

After doing this, Application.resumedEvent and Application.suspendEvent event handlers are triggered twice.

Before changing Info.plist, all Application lifecycle event handlers were triggered only once, as expected.

Reproduction

sample app to reproduce:
ns-ios-app-lifecycle.zip

event handlers with console.log statements are defined in app.js

Relevant log output (if applicable)

-

Environment

OS: macOS 26.5.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Shell: /bin/zsh
node: 24.15.0
npm: 11.16.0
nativescript: 9.0.6

# android
java: 17.0.11
ndk: Not Found
apis: 35, 36, 36, 37
build_tools: 34.0.0, 35.0.0, 35.0.1, 36.0.0, 36.1.0, 37.0.0
system_images: 
  - android-36.1 | Google Play Intel x86_64 Atom
  - android-36.1 | Pre-Release 16 KB Page Size Google Play Intel x86_64 Atom
  - android-37.0 | 16 KB Page Size Google Play Intel x86_64 Atom

# ios
xcode: 26.5/17F42
cocoapods: 1.16.2
python: 2.7.18
python3: 3.13.0
ruby: 2.6.10
platforms: 
  - DriverKit 25.5
  - iOS 26.5
  - macOS 26.5
  - tvOS 26.5
  - visionOS 26.5
  - watchOS 26.5

Dependencies

"dependencies": {
  "@nativescript/core": "^9.0.20",
  "@nativescript/theme": "^3.1.0"
},
"devDependencies": {
  "@nativescript/ios": "^9.0.3",
  "@nativescript/webpack": "^5.0.35"
}

Please accept these terms

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-pending-triageReported bug, pending triage to confirm.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions