diff --git a/packages/react-native/React/Fabric/RCTSurfaceTouchHandler.mm b/packages/react-native/React/Fabric/RCTSurfaceTouchHandler.mm index 4945d3559f60..1bf565db2266 100644 --- a/packages/react-native/React/Fabric/RCTSurfaceTouchHandler.mm +++ b/packages/react-native/React/Fabric/RCTSurfaceTouchHandler.mm @@ -8,6 +8,7 @@ #import "RCTSurfaceTouchHandler.h" #import +#import #import #import @@ -206,8 +207,8 @@ - (void)_updateTouches:(NSSet *)touches { for (UITouch *touch in touches) { auto iterator = _activeTouches.find(touch); - RCTAssert(iterator != _activeTouches.end(), @"Inconsistency between local and UIKit touch registries"); if (iterator == _activeTouches.end()) { + RCTLogWarn(@"Inconsistency between local and UIKit touch registries"); continue; } @@ -219,8 +220,8 @@ - (void)_unregisterTouches:(NSSet *)touches { for (UITouch *touch in touches) { auto iterator = _activeTouches.find(touch); - RCTAssert(iterator != _activeTouches.end(), @"Inconsistency between local and UIKit touch registries"); if (iterator == _activeTouches.end()) { + RCTLogWarn(@"Inconsistency between local and UIKit touch registries"); continue; } auto &activeTouch = iterator->second; @@ -236,8 +237,8 @@ - (void)_unregisterTouches:(NSSet *)touches for (UITouch *touch in touches) { auto iterator = _activeTouches.find(touch); - RCTAssert(iterator != _activeTouches.end(), @"Inconsistency between local and UIKit touch registries"); if (iterator == _activeTouches.end()) { + RCTLogWarn(@"Inconsistency between local and UIKit touch registries"); continue; } activeTouches.push_back(iterator->second);