googlemaps / googlemaps/react-native-navigation-sdk

[Bug]: Turn-by-turn crashes on every step change in larger application

Abierto
#649 2 comentarios 0 reacciones 1 asignado Reclamado por @illuminati1911 Ver en GitHub
native sdk issue type: bug
Lenguaje dominante
TypeScript
Estrellas
227
Forks
38
Merge medio
4 d 8 h
PR fusionados (30 d)
16

Descripción

### 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_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.