Summary
The onLongPress callback on MapViewcomponent is not working on iOS devices. The callback is properly implemented but never gets triggered on iOS, while it works as expected on Android.
Reproducible sample code
<MapView
onLongPress={(e) => {
console.log("onLongPress", e);
setAddLocation(e.nativeEvent.coordinate);
}}
// ... other props
Steps to reproduce
Just put onLongPress callback on MapView and notice it won't be triggered.
Expected result
Long press on the map should trigger the onLongPress callback
The callback should receive the event object with coordinates
Actual result
Long press on the map does not trigger the callback on iOS
No console logs are shown when long pressing
The functionality works as expected on Android
React Native Maps Version
1.23.8
What platforms are you seeing the problem on?
iOS (Apple Maps)
React Native Version
0.79.2
What version of Expo are you using?
SDK 53
Device(s)
Any iOS Device
Topic:
App & System Services
SubTopic:
Maps & Location