1

I'm trying to make interactive annotations on a Map with MapKit and everything works fine on iOS 17. The only issue I have is that on visionOS, the tap gesture is not being recognised, so I when I click on an annotation nothing happens. I'm only testing with the Simulator since I do not have an actual Vision Pro.

Creating a basic Map with Annotations but when I press on an annotation in the Vision Pro Simulator, nothing happens/is printed out; also tried it with having a popover or sheet but it just doesn't work:

Map() {
   ForEach(annotations) { annotation in 
       Annotation(annotation.name, coordinate: ...) {
           Button {
                print("Annotation pressed)
           } label: {
               // Image for annotation
           }
       }
   }
}
1
  • Could you please extend your example to one that we can load and try? A minimal reproducible example is very helpful. Also tell us what version of visionOS you're on (1.0, 1.2, 2.0 beta...). Commented Jun 16, 2024 at 20:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.