Skip to content

fix(ios): [new arch] Module provider RNDatePickerManager does not conform to RCTModuleProvider - #965

Open
hannojg wants to merge 1 commit into
henninghall:masterfrom
hannojg:hannojg/fix-error-app-start-not-following-turbo-module-setup
Open

fix(ios): [new arch] Module provider RNDatePickerManager does not conform to RCTModuleProvider#965
hannojg wants to merge 1 commit into
henninghall:masterfrom
hannojg:hannojg/fix-error-app-start-not-following-turbo-module-setup

Conversation

@hannojg

@hannojg hannojg commented Mar 27, 2026

Copy link
Copy Markdown

On new arch iOS builds i was getting the following error:

IMG_3449

We have to conform to that protocol for which we have to implement getTurboModule:.
This PR adds support for that which effectively fixes this issue

@therveux

therveux commented Jun 4, 2026

Copy link
Copy Markdown

@henninghall Can you look at this ? A release would be really appreciated 🙏

UxmanKaxmi pushed a commit to UxmanKaxmi/taskswapMobile that referenced this pull request Jul 6, 2026
RNDatePickerManager doesn't conform to RCTModuleProvider (redbox on
launch). Applies upstream PR henninghall/react-native-date-picker#965
via bun patch (getTurboModule: implementation) until a fixed version
is published.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ElhanM

ElhanM commented Jul 21, 2026

Copy link
Copy Markdown

hit this exact crash on RN 0.81 new arch with 5.0.13. i've been ripping out ios.modulesProvider as a stopgap but that kills the imperative modal module, so this is the better fix imo since conforming + implementing getTurboModule actually keeps it working. any chance of getting this merged? there's like 5 open PRs and a pile of dupe issues all for the same thing 🙏

@seba9999

Copy link
Copy Markdown

@henninghall Any chance to get that merged ? 👍

@godza

godza commented Aug 4, 2026

Copy link
Copy Markdown

Confirming this on React Native 0.86.2 (New Architecture, bridgeless) with react-native-date-picker@5.0.13 — the app dies on launch with exactly Module provider RNDatePickerManager does not conform to RCTModuleProvider, then reload-loops.

Why some people can't reproduce it. ios/build/generated is sticky. A build whose RCTModuleProviders.mm was generated before upgrading to 5.x contains no date-picker entry at all, so the app launches fine and the version looks verified. Any later pod install regenerates the file, the entry appears, and the next launch breaks — with nothing in the diff to explain it. To see the crash reliably:

rm -rf ios/build/generated && cd ios && pod install

This PR's approach looks like the right one. #929 removes the modulesProvider key instead. That does stop the crash, but it gives up the modal picker's TurboModule; making RNDatePickerManager conform, as here, keeps it.

One thing worth checking before this lands. On iOS the JS side never asks the TurboModule registry — getNativeModule() in src/modules.js is:

case 'ios':
  return NativeModules.RNDatePicker
case 'android':
  return TurboModuleRegistry.get('RNDatePicker')

So after this change the native class satisfies codegen's conformance check, but useModal still reaches the module through NativeModules and the interop layer. That's enough to fix the crash, and it may well be the intent. But if the goal is a real TurboModule on iOS, modules.js probably needs TurboModuleRegistry.get there too — and at that point the openPicker argument-count mismatch that #967 / #971 address starts to matter, since JS would be calling through the generated spec rather than the legacy bridge. Might be worth landing those together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants