googlemaps / googlemaps/react-native-navigation-sdk
[Bug]: Turn-by-turn crashes on every step change in larger application
- Dominant language
- TypeScript
- Stars
- 227
- Forks
- 38
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 10
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Description of the bug
Turn-by-turn navigation crashes on every guidance step change in a large host app (~230 pods) / ~ 400+ mb. The SDK's own sample app — same Xcode, same GoogleNavigation archive, same machine — is unaffected.
Xcode 15+'s default linker (ld_prime) mis-applies an ADRP relocation when linking GoogleNavigation's prebuilt static archive into a sufficiently large binary. Inside -[GMSNManeuverCalloutProvider contentSourceForManeuverCalloutModel:screenInfo:ue3Logger:improveStyling:], the class-reference load resolves into __DATA,__objc_data instead of __DATA_CONST,__objc_classrefs. It therefore reads an unrelated class object's superclass field — NSObject — and allocates that instead of GMSDManeuverCalloutRenderer.
The next message fails:
-[NSObject initWithCalloutModel:screenInfo:ue3Logger:]: unrecognized selector sent to instance 0x…
Adding -Wl,-ld_classic to OTHER_LDFLAGS fixes it, confirmed by disassembly and by completing a full route. But that flag is deprecated and removed in Xcode 27, and GoogleNavigation ships static-only — so affected apps will soon have no workaround.
### iOS Platform
Affected
### Android Platform
Not affected
### React Native version
0.85.3
### React version
19.2.3
### Package version
0.16.3
### Native SDK versions
- [x] I haven't changed the version of the native SDKs
### React Native Doctor Output
✓ Node.js - Required to execute JavaScript code
✓ yarn - Required to install NPM dependencies
✓ npm - Required to install NPM dependencies
✓ Watchman - Used for watching changes in the filesystem when in development mode
● Metro - Metro Bundler is not running
iOS
✓ Xcode - Required for building and installing your app on iOS
✓ Ruby - Required for installing iOS dependencies
✓ CocoaPods - Required for installing iOS dependencies
✓ .xcode.env - File to customize Xcode environment
### Steps to reproduce
1. Integrate this SDK into a large host app — ours links several dozen pods and produces a multi-hundred-megabyte debug binary. The sample app does not reproduce it; binary size/layout is the trigger.
2. Build with Xcode 15+ (which defaults to ld_prime); verified on 26.1 / ld-1230.1
3. Crash on the first step change
### Expected vs Actual Behavior
Turn by turn to work as expected
### Code Sample
no code sample
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.