Commit 12c7751
authored
fix(ios): support static frameworks under Expo SDK 57 precompiled pipeline (#4245)
Building @rnmapbox/maps with Expo SDK 56+'s precompiled iOS pipeline and
`useFrameworks: static` (e.g. required by react-native-firebase) failed at
two stages:
1. `pod install` raised `verify_no_static_framework_transitive_dependencies`.
rnmapbox's pre_install flips the Mapbox pods to dynamic frameworks, then
Expo's precompiled hook downgrades most of them back to static libraries -
but not MapboxMaps, leaving a dynamic pod with static dependencies.
2. Even past that, compilation failed with
`'rnmapbox_maps/rnmapbox_maps-Swift.h' file not found`. The
RNMBX_USE_FRAMEWORKS macro was frozen at podspec-eval time from the
USE_FRAMEWORKS env, so the Swift header shim took the framework import path
while Expo actually built the pod as a static library.
Fixes:
- Resolve the generated Swift header with `__has_include`, which follows the
pod's actual build output instead of a stale macro (same pattern already
used in RNMBXFollyConvert.h). The now-unused RNMBX_USE_FRAMEWORKS flag is
removed.
- Skip the Mapbox dynamic-framework flip when Expo's precompiled pipeline is
active (EXPO_USE_PRECOMPILED_MODULES=1) so all Mapbox pods stay consistently
static.
Verified on a fresh Expo SDK 57 (RN 0.86) app with useFrameworks: static:
clean pod install and a successful rnmapbox-maps compile (Xcode 26.6).1 parent d4452ff commit 12c7751
2 files changed
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
202 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
203 | 215 | | |
204 | 216 | | |
205 | 217 | | |
| |||
286 | 298 | | |
287 | 299 | | |
288 | 300 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | 301 | | |
293 | 302 | | |
294 | 303 | | |
| |||
0 commit comments