Our app presents an NSOpenPanel with an accessory view implemented in SwiftUI and presented via NSHostingView. TextFields and pickers are working OK, but Buttons and Toggles (checkboxes) aren’t, although Toggles styled with .switch are functioning as expected. Specifically:
Toggles styled with .checkbox fail with no feedback. Overriding NSHostingView mouseDown() shows that the mouse event is completely ignored by the Toggle
Buttons “see” the mouseDown event (the button highlights when pressed, and the event doesn’t fall through to the hosting view), but the button action isn’t triggered until the dialog is dismissed
Any idea on how to get these controls functional?
Post
Replies
Boosts
Views
Activity
WiFi and Bluetooth are both enabled on Mac and iPhone, neither device is connected to a network
Running MultipeerConnectivity on the Mac as Advertiser and iPhone as Browser, the invitation is sent from the phone and accepted by the mac, but the connection is then dropped. This doesn’t happen when the Advertiser is another iOS device.
STEPS TO REPRODUCE THE PROBLEM
We have created a small sample project that demonstrates the problem. It can be found at: https://github.com/eidria/Multipeer-Progress-Demo.git. It contains both a Mac app and a iOS app.
Run the Mac app and start Advertising
Run iOS app and start Browsing
The iOS app automatically issues an invitation to the browser (Mac) which accepts. Shortly after the connection is dropped.