Skip to content

In Xcode 26, 'present(item:content)' dismisses the parent controller with the share sheet #298

@asa08

Description

@asa08

Description

In Xcode 26, when displaying a share sheet with this method, the parent controller persists at Presentation.swift L378, which causes it to be dismissed along with the share sheet.

present(item: $store.scope(state: \.destination?.activity, action: \.destination.activity)) { [weak self] store in
    let activityViewController = UIActivityViewController(
        activityItems: [store.withState(\.title), store.withState(\.url)],
        applicationActivities: [SafariActivity()]
    )
    return activityViewController
}

Presentation.swift L378

Image

This issue doesn't occur in Xcode 18 and earlier because the parent controller is not present at Presentation.swift L378.

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

SwiftUI Navigation version information

No response

Destination operating system

iOS26

Xcode version information

Xcode26 bata3

Swift Compiler version information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions