Post

Replies

Boosts

Views

Activity

[VisionOS] .onDelete gesture not triggered for mouse
I found a regression in Apple Vision OS 2.0 beta 3 (22N5277g). Previously, it was possible to trigger the .onDelete swipe gesture on a List/ForEach with a virtual mouse (i.e. remote desktop), however this is no longer possible (a finger pinch still works). Sample code to reproduce the issue: // // ContentView.swift // TextInputTest // import SwiftUI struct ListElement: Identifiable { let id = UUID() let content: String } struct ContentView: View { @State var list = [ ListElement(content: "a"), ListElement(content: "b"), ListElement(content: "c") ] var body: some View { List { ForEach(list) { element in Text(element.content) } .onDelete { _ in // No-op. } } } }
0
0
258
Jul ’24
[VisionOS] TextEditor does not respect .autocorrectionDisabled
Hello everyone, I wanted to double check with the UI Framework team to see if there's a mistake in my code or if there's some sort of regression. My goal is to have a user input text without any automatic modification of said text, namely remove auto-capitalization and auto-correct. // // ContentView.swift // TextInputTest // import SwiftUI struct ContentView: View { @State var text: String = "Enter some text here!" var body: some View { VStack { TextEditor(text: $text) .autocorrectionDisabled(true) .textInputAutocapitalization(.never) .font(Font.custom("SF Mono", size: 30)) .monospaced() .padding(20) } .padding() } } However, when typing the following: "This is a sentence" followed by a few spaces, a dot will automatically be inserted, making the string become: "This is a sentence.". Reproduced on: VisionOS 2.0 beta 3 (22N5277g)
2
0
369
Jul ’24
[WebXR] Support for AR module in VisionOS 2.x
Thank you again for pushing the web forward in VisionOS 2, super exciting! The latest WWDC24 video touched on VR experiences for VisionOS2.0 using WebXR, however there was no mention of passthrough AR experiences. Samples such as this one are not supported: https://immersive-web.github.io/webxr-samples/immersive-ar-session.html In Settings > Safari, there is a feature flag for the AR WebXR module, but enabling it did not seem to change anything. Is this the expected behavior at this time? Any developer preview(s) we could try?
2
2
1.2k
Jun ’24
[Metal Passthrough] upperLimbVisibility not respected in sample code
Hello everyone, Super exciting stuff released this year! I was playing around with the Metal passthrough sample code (see: https://developer.apple.com/documentation/compositorservices/interacting_with_virtual_content_blended_with_passthrough) ... and noticed that the upperLimbVisibility set to .automatic does not seem to work and my hand is always on top. How to reproduce: Draw something Position your hand behind the brush stroke Notice that your hands are always rendered on top Taking a GPU frame capture reveals that the depth is correctly written. Xcode: Version 16.0 beta (16A5171c) VisionOS: visionOS 2.0 (22N5252n)
1
0
570
Jun ’24
VisionOS Metal Sample issue with clearColor
Hi everyone, This happens with Xcode 15.3 (15E204a) and visionOS 1.1.2 (21O231). To reproduce this issue, simply create a new VisionOS app with Metal (see below). Then simply change the following piece of code in Renderer.swift: func renderFrame() { [...] // Set the clear color red channel to 1.0 instead of 0.0. renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 0.0) [...] } On the simulator it works as expected while on device it will show a black background with red jagged edges (see below).
2
0
621
Apr ’24
[VisionOS] Can't import RealitKit/RealityKit.h for custom shader materials
Version details: Xcode Version 15.3 beta (15E5178i) visionOS 1.0 (21N301) SDK + visionOS 1.0 (21N305) Simulator (Installed) I'm trying to make a ModelEntity with a CustomMaterial.GeometryModifier for which I also created a metal shader file. The said shader file is extremely simple at this time: #include <metal_stdlib> #include <RealityKit/RealityKit.h> using namespace metal; [[visible]] void ExpandGeometryModifier(realitykit::geometry_parameters params) { // Nothing. } When trying to compile my project, I get the following error: 'RealityKit/RealityKit.h' file not found Is this not supported on VisionOS?
2
0
817
Feb ’24