Description
Hi!
I've stumble upon an issue when displaying two popover in a row while in a "presented view controller".
Here is the sequence:
- User taps share button in a modal → first popover (ShareForSureViewController) appears
- User taps "Share for sure" → first popover dismisses
- After 800ms delay → second popover (UIActivityViewController share sheet) should appear
Issue: On iOS 26 with TCA, when triggered from within a modal, instead of showing the second popover, the entire modal view controller is dismissed. This does not occur in:
- Vanilla UIKit version (works correctly)
- iOS < 26 (works correctly)
- Main view controller (no modal) — same sequence works correctly
Affected code: ShareSheetBugiOS26TCA/ModalViewController.swift — the TCA presentation logic for the share sheet popover (lines 76-92) fails on iOS 26 when triggered from within a modal, causing the modal to dismiss instead of presenting the second popover.
Note that this is not a "share sheet" issue, if I setup the first popover in a loop ("share for sure" button displaying itself instead of shareSheet), it behaves the same way.
Here is a video recording of the issue:
https://github.com/user-attachments/assets/d39ff27a-d05a-4b0b-863f-0ecf399dacf7
(we can see at the end that instead of displaying the share sheet, the green modal is dismissed)
(this issue is kind of linked to the discussion here but this time, adding or increasing the delay doesn't solve the issue, so the problem has worsen with iOS 26)
Checklist
Expected behavior
The second popover should be displayed
Actual behavior
the presented view controller is dismissed instead
Reproducing project
And a sample code to reproduce the issue:
ShareSheetBugiOS26.zip
This sample code includes two targets, one in Vanilla UIKit and one in TCA + UIKit Navigation.
So if you run the Vanilla UIKit version in both iOS 26 and iOS 18, every buttons works correctly
And if you run the TCA version, all buttons works correctly in iOS 18 and in iOS 26 all works correctly except the trailing share button in the modal.
The Composable Architecture version information
'1.23.1', 'main'
Destination operating system
'iOS 26'
Xcode version information
Version 26.2 (17C52)
Swift Compiler version information
swift-driver version: 1.127.14.1 Apple Swift version 6.2.3 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
Target: arm64-apple-macosx26.0
Description
Hi!
I've stumble upon an issue when displaying two popover in a row while in a "presented view controller".
Here is the sequence:
Issue: On iOS 26 with TCA, when triggered from within a modal, instead of showing the second popover, the entire modal view controller is dismissed. This does not occur in:
Affected code: ShareSheetBugiOS26TCA/ModalViewController.swift — the TCA presentation logic for the share sheet popover (lines 76-92) fails on iOS 26 when triggered from within a modal, causing the modal to dismiss instead of presenting the second popover.
Note that this is not a "share sheet" issue, if I setup the first popover in a loop ("share for sure" button displaying itself instead of shareSheet), it behaves the same way.
Here is a video recording of the issue:
https://github.com/user-attachments/assets/d39ff27a-d05a-4b0b-863f-0ecf399dacf7
(we can see at the end that instead of displaying the share sheet, the green modal is dismissed)
(this issue is kind of linked to the discussion here but this time, adding or increasing the delay doesn't solve the issue, so the problem has worsen with iOS 26)
Checklist
mainbranch of this package.Expected behavior
The second popover should be displayed
Actual behavior
the presented view controller is dismissed instead
Reproducing project
And a sample code to reproduce the issue:
ShareSheetBugiOS26.zip
This sample code includes two targets, one in Vanilla UIKit and one in TCA + UIKit Navigation.
So if you run the Vanilla UIKit version in both iOS 26 and iOS 18, every buttons works correctly
And if you run the TCA version, all buttons works correctly in iOS 18 and in iOS 26 all works correctly except the trailing share button in the modal.
The Composable Architecture version information
'1.23.1', 'main'
Destination operating system
'iOS 26'
Xcode version information
Version 26.2 (17C52)
Swift Compiler version information