Commit ea83410
authored
fix(ios): guard +load with #ifdef RCT_DYNAMIC_FRAMEWORKS (#4047)
## Summary
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).
## Test plan
- Build xcframework with static linking (no `USE_FRAMEWORKS=dynamic`)
- Verify `RNGestureHandlerButtonComponentView +load` is not in the
binary (`nm` check)
- Run on x86_64 simulator alongside Akamai BMP — no crash at launch
- Run on arm64 simulator — gesture handler works normally1 parent 1e87668 commit ea83410
1 file changed
Lines changed: 2 additions & 0 deletions
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
0 commit comments