From 022e21037ddabded8b2ed1962d023e3600dbce4d Mon Sep 17 00:00:00 2001 From: David Duarte Date: Tue, 31 Mar 2026 14:24:19 +0200 Subject: [PATCH] fix(ios): guard +load with #ifdef RCT_DYNAMIC_FRAMEWORKS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The +load method in RNGestureHandlerButtonComponentView is unconditional, but its parent RCTViewComponentView correctly guards its +load behind #ifdef RCT_DYNAMIC_FRAMEWORKS. Without the guard, the child's +load runs even when dynamic frameworks are not used, causing conflicts with third-party SDKs (e.g. Akamai BMP) that also use +load — particularly on x86_64 simulators where the load order differs from arm64. This matches the pattern used by React Native core in RCTViewComponentView.mm (see facebook/react-native#37274). --- .../apple/RNGestureHandlerButtonComponentView.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm b/packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm index a87ca71a71..843acf9d8d 100644 --- a/packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm +++ b/packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm @@ -45,10 +45,12 @@ + (BOOL)shouldBeRecycled #endif // Needed because of this: https://github.com/facebook/react-native/pull/37274 +#ifdef RCT_DYNAMIC_FRAMEWORKS + (void)load { [super load]; } +#endif - (instancetype)initWithFrame:(CGRect)frame {