Skip to content

Conversation

@nathantannar4
Copy link
Contributor

Thanks for the great work in starting this library and uncovering the hidden APIs!

When attempting to use it in my project, I ran into 3 key issues:

  1. iOS 18+ requirement, but I tested and the hidden APIs work on iOS 16 (maybe even earlier)
  2. contextMenuAccessory did not receive view updates during presentation, which meant if the view that changes were not rendered
  3. I needed programatic dismissal of the context menu if a action was performed in the accessory view

I resolved these issues in a fork, and now I am happy to help integrate a subset or all of them here.

iOS 18+ requirement

To resolve this, I switched from a static XCFramework to am SPM library

contextMenuAccessory did not receive view updates during presentation

The bug here was that the _UIHostingView's root view was not updated in updateUIView

I needed programatic dismissal

Added a ContextMenuProxy which is passed into the accessory view @ViewBuilder to expose a dismiss method, which internally calls upon the UIContextMenuInteraction

@nathantannar4
Copy link
Contributor Author

This also resolves #5

@claude

This comment was marked as outdated.

Expanded documentation for the `contextMenuAccessory` SwiftUI modifier, clarifying its variants and parameters. Added examples for both basic usage and programmatic dismissal. Updated iOS version badge from 18+ to 16+.
@Aeastr Aeastr self-requested a review September 16, 2025 21:08
@claude

This comment was marked as outdated.

@Aeastr Aeastr merged commit 0aa157e into Aeastr:main Sep 17, 2025
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants