Repository navigation
Replies: 4 comments 1 reply
|
Resolved — and the cause was on our side, not yours. Posting the details because two of them are still worth fixing in the library, and the third will bite any Expo app. It was our own splash screen. The "large app icon where the map should be" was Proven by removal. Native probe on the root view, before and after calling With that one call, the Google Navigation SDK's Two things from the original post still stand, and a third I would now rank higher:
One more that may be worth a line in the docs regardless of the above: an app whose startup is non-trivial can miss Thanks for the library — the semantic maneuver types in particular are a much better design than building per-platform icon mapping ourselves. |
|
Follow-up with a production report: the integration shipped. One JS codebase now drives guidance on BOTH CarPlay and Android Auto in our app — Google Nav SDK session on the phone, its nav info mapped in TypeScript onto your Two findings that may help other integrators (or the docs):
Happy to expand either into a proper issue/PR if useful. |
|
Follow-up on the Android composition limit above: we built the Android counterpart of the iOS |
|
Hey @spendres thank you so much for posting & sharing your findings here! I'll try to make the same integration Google's |
Uh oh!
There was an error while loading. Please reload this page.
Thanks for this library — the API shape is exactly what we needed, and the cross-platform maneuver types (
TurnType,OffRampType, … mapping to bothTYPE_TURN_SLIGHT_LEFTandslightLeftTurn) are a better design than we'd have arrived at ourselves.We're integrating into an Expo SDK 57 app (prebuild/CNG, New Architecture, RN 0.86.2) that also uses
@googlemaps/react-native-navigation-sdk. We're stuck on the main question below, and found three things on the way that look like real issues rather than our misuse.1. The README's
getRootViewForAutoplaysnippet doesn't compile on Expo SDK 57The documented snippet calls:
which on SDK 57 fails with:
superViewWithModuleName:gained two parameters (EXReactRootViewFactory.h:28-32), and Expo's own caller supplies them (ExpoReactNativeFactory.swift:166-172):Smaller snag in the same snippet: Expo's generated
AppDelegatedeclaresvar reactNativeFactory: RCTReactNativeFactory?(base type) while assigning anExpoReactNativeFactory, so reaching Expo-specific members needs a downcast.Question: what is the intended implementation on SDK 57? We currently delegate to Expo's public
recreateRootView(withBundleURL:moduleName:initialProps:launchOptions:), which assembles both arguments internally and calls the samesuperView— but see the last section, because we may be handing back the wrong type.2.
WindowApplicationSceneDelegatesilently blanks the phone on ExpoWindowApplicationSceneDelegate.swift:24-26:Against Expo's generated
AppDelegate.swiftthis returns nil. The template declaresvar window: UIWindow?as plain Swift, and Swift 4+ does not infer@objc, so theUIApplicationDelegate.windowselector lookup finds nothing. Theguardreturns silently, no window is made key and visible, and the phone is blank from the first frame with no error anywhere.We hit exactly this in our own scene delegate last week; our fix was casting to the concrete
AppDelegatetype in the same module instead of going through the protocol. That's Expo-specific so it may not suit a general library, but a loudNSLogon thatguardwould save the next person a day.3.
NitroSurface.stop:logs "not recognized type" unconditionallyThe log sits outside the
if, so it fires on the success path too. We treated it as the smoking gun for our problem before reading the source. Moving it into anelsewould make it mean what it says.What we're actually stuck on
CarPlay shows our app icon; tapping it opens an empty surface and the scene tears down a few seconds later. From a device log archive we have confirmed:
CPTemplateApplicationSceneis created and carkit authenticates the session;NitroSurface.stopexecutes on teardown, soHeadUnitSceneDelegateandAutoPlaySceneare live;MapTemplateis constructed with acomponent, andsetRootTemplate()is called from thedidConnectlistener — also guarded byisConnected()at registration, since our app's startup is long enough that the event can otherwise land before the listener attaches.So the gap is between scene-connect and a rendered surface, and neither side logs there.
Is there a known-good Expo SDK 57 integration? Given that
NitroSurfacechecks specifically forRCTSurfaceHostingView, if the answer to §1 is "it must return that exact class", that would likely resolve this immediately — and would explain whyrecreateRootViewisn't equivalent even though it calls the samesuperViewinternally.Happy to contribute an Expo section to the README, or a PR for §2 and §3, once we have a working integration.
All reactions