Post

Replies

Boosts

Views

Activity

Comment on visionOS RealityView attachment SwiftUI controls don't always respond to user interaction
They also wrote "Unfortunately, we know that it sometimes not getting a timely response may feel like your report goes unseen, but please know that every bug report submitted by a developer is read by and responded to by a real person." I don't think "responded to by a real person" literally means that they type a comment or that you see any actual visible indication of a response, but this sounds reassuring. An Apple engineer I know also told me that all of them eventually get read.
Sep ’23
Comment on visionOS RealityView attachment SwiftUI controls don't always respond to user interaction
Your original solution works most of the time in RealityView/make but I still experienced unresponsive SwiftUI attachment controls if I updated the SwiftUI view later. I was eventually able to work around this by adding a debug option to tear down my RealityView completely and recreate it it, which re-executes the make closure with your awesome fix, and I can use this as a workaround until Apple fixes this issue.
Sep ’23
Comment on visionOS RealityView attachment SwiftUI controls don't always respond to user interaction
By "if I later update the attachment to display a different set of controls", what I meant is that the reality view's RealityViewAttachments and my attachment's corresponding entity remains unchanged, but my attachment's view is repopulated with a different set of controls depending on several if/then statements. The set of controls can also change dynamically over time in response to user action. (I only ever have one attachment.)
Sep ’23
Comment on visionOS RealityView attachment SwiftUI controls don't always respond to user interaction
Thank you, this is a wonderful find. I did a quick test and it seemed to work although I'd have to do more testing to make sure. However, it only works for the first set of controls my app displays. If I later update the attachment to display a different set of controls, I still see the same issue. I have to run off now but I'll give this more thought. Maybe I can introduce a delay when the controls view is updated later, and that'll also work. But, this is a wonderful clue. You are amazing.
Sep ’23