UI Sounds visionOS

Hi,

Looking to get secondary tap sound in UI,

When in menus on visionOS there is a secondary sound that isn't a button sound when you tap on elements not - does anyone know how to add this sound (it's also in settings when you tap on any element? Currently I am generating a similar field as in the appstore settings but the onTapGesture doesn't make a system sound.

Thanks!

        let title: String
        let subtitle: String?
        let action: (() -> Void)?
        @State private var isHovered = false
        
        init(title: String, subtitle: String? = nil, action: (() -> Void)? = nil) {
            self.title = title
            self.subtitle = subtitle
            self.action = action
        }
        
        var body: some View {
            HStack {
                VStack(alignment: .leading, spacing: 2) {
                    Text(title)
                        .font(.body)
                        .foregroundColor(.primary)
                    if let subtitle = subtitle {
                        Text(subtitle)
                            .font(.caption)
                            .foregroundColor(.secondary)
                    }
                }
                
                Spacer()
                
                Image(systemName: "chevron.right")
                    .font(.system(size: 12, weight: .medium))
                    .foregroundColor(.secondary)
            }
            .padding(.horizontal, 24)
            .frame(height: 50.45)
            .background(.black.opacity(0.3))
            .onTapGesture {
                action?()
            }
            .hoverEffect(.highlight)
        }
    }

UI Sounds visionOS
 
 
Q