Home > front end >  WatchOS 8 pressing one of the side buttons dismisses modal sheet
WatchOS 8 pressing one of the side buttons dismisses modal sheet

Time:10-07

The behavior of the crown button on the Apple Watch has always been to close your app and take you to your Home Screen / watch face. Now when I build my watch app with Xcode 13 and WatchOS 8 when I press one of the side buttons it dismisses whatever modal sheet I have in my app.

This is a terrible user experience as my app is a workout app and I want my users to quickly get to other apps such as music while they are working out without closing everything out.

Apple's workout app presents a modal to add a workout but when I hit the side button in their app it takes me to the Home Screen. I have tried to watch all the latest videos and read the documentation but I don't see anywhere that I can disable this new functionality of the side buttons. Anyone know how I can change the physical side button behavior for my app? Thank you for your help!

CodePudding user response:

It is a new feature. Add .interactiveDismissDisabled() to the content on the sheet or fullScreenCover.

https://developer.apple.com/documentation/swiftui/navigationview/interactivedismissdisabled(_:)

CodePudding user response:

This is working as intended, it got changed in WatchOS 8.

Your best bet would be to submit it to Apple feature assistant.

  • Related