Commit 2d16436
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 812984f commit 2d16436
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 | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
0 commit comments