Swiftui sheets on mac app doesn't work properly - swift

When attempting to use sheets on a Mac OS app, it's not interactable (sliding down to go back to the previous view) like on iOs. Is this normal or would I need a workaround to go back to the previous view?

You’ll need a close button on macOS, there is no dismissal gesture. If your app supports iOS too, it’s probably wise to have a close button there too — not all iPad users are familiar with the gesture, and the gesture doesn’t work on landscape phones.

Related

Flutter: detect if device has "back navigation" built into the OS?

In Flutter, I would like to know if the device has any functionality built into the OS for navigating back. Or in other words, if the user can trigger navigation without having an actual button within the app.
For example, an iPhone 7 does not have a physical back button or a swipe-back gesture. If the app doesn't have it's own way to navigate, the user can get stuck.
On the contrary, most modern devices have some way of going back built into the system, like a physical/virtual back button or a swipe-back gesture.
Can I distinguish between these types of devices?
From what I have seen it is only IOS that do this, so it can be done with:
if (Platform.isIOS){
#show backButton();
}
But I have not seen a package or function that specifically lets you know this information. Keep me in the loop if you find anything

WatchOS 8 pressing one of the side buttons dismisses modal sheet

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!
It is a new feature. Add .interactiveDismissDisabled() to the content on the sheet or fullScreenCover.
https://developer.apple.com/documentation/swiftui/navigationview/interactivedismissdisabled(_:)
This is working as intended, it got changed in WatchOS 8.
Your best bet would be to submit it to Apple feature assistant.

iPhone - hide assistive touch view programmatically

Does anyone know how to hide assistive touch view programmatically like Apple Music App does when playing video?
There is no SDK method to hide the assistive view.
Apple iPod App is done by Apple, so the App is probably using some private / undocumented SDK calls.
Yes there is. Go to Settings then General then Accessibility then Triple Click Home. Now choose Assistive Touch. Now whenever you want it to disappear just triple click the Home button on either the actual iPhone or using the Assustive Touch icon itself. Poof and its gone! To bring it back just triple click again.

Tap to focus on camera apps, Supposedly not possible, but a bug in my app enables it (although useless)

I would like to get tap to focus in my app and the controls are hidden
Supposedly this is impossible but I know its not. I have a simple iAD dragged into an overlay, no code or anything. When I click on the iAD nothing. but when I close it with the home button I get a modal exit of the nonexistant iAD and the camera apps relaunches but in the top left with only a small portion viewable. But this time the tap to focus is enabled.
So how can I do this without the bug?
Thanks!
Guess no one got it? I just showed the controls to take a snap and zoom and focus came up!

Touch events with Magic Mouse and iPhone Simulator

I observe that with the iMac magic mouse, while using the iPhone simulator, if:
a) the active view has an object in the center of the iPhone screen which is capable of generating touch events, and
b) the iMac operator accidentally or otherwise drags their finger(s) across the magic mouse surface in a way which would normally be used for scrolling, that
the object in the center generates (bogus) mouse down and drag events.
If there is no such object in the center of the screen, there is no issue.
Is there a way to programmatically or otherwise disable this feature?
This is actually an issue with all Mac input devices with scroll functionality. If you do a two-fingered scroll up and down on a Macbook touch pad the same thing happens.
I believe this is more or less "intended", though it appears the touch up event is lost - so sometimes the interface gets stuck after a scroll gesture. I don't know of a way to programmatically disable this feature, unfortunately :-/
Gesture-based scrolling the iOS simulator was disabled sometime around iOS 4 or the iPad, I believe. It would have conflicted with the giant, scrolling window of the iOS simulator running on smaller screens.