Description
Libraries with minimal codegenConfig (containing only name, type, jsSrcsDir) but no explicit ios.components or ios.componentProvider are not properly included in the generated RCTThirdPartyComponentsProvider during iOS codegen.
This affects libraries like @shopify/flash-list or braze that rely on the fallback file crawling mechanism.
Expected Behavior
Libraries with type: "components" should participate in fallback file crawling even without explicit ios.components config. The crawling mechanism is specifically designed for libraries that don't explicitly declare their native mappings.
Actual Behavior
Scenario 1: App has empty ios:
"codegenConfig": {
"name": "AppSpecs",
"type": "all",
"useLegacyPackaging": false,
"jsSrcsDir": "specs",
"android": {},
"ios": {}
},
Library components are found but incorrectly attributed to the app instead of the library
Example: @"AutoLayoutView": NSClassFromString(@"AutoLayoutViewComponentView"), // myapp
This happens because the app gets crawled, and the file scanner recursively scans node_modules/
Scenario 2: App has populated ios:
"codegenConfig": {
"name": "AppSpecs",
"type": "all",
"useLegacyPackaging": false,
"jsSrcsDir": "specs",
"android": {
"javaPackageName": "com.example"
},
"ios": {
"modulesProvider": {
"NativeExample": "RCTNativeExample"
},
"componentProvider": {
"ExampleView": "RCTExampleView"
}
}
},
Library components are completely missing from the generated file
The app goes to "Old API" path (which never crawls), and affected libraries are skipped in parseiOSAnnotations() before being added to the crawl list
Proposed Fix
Move the library initialization before the iosConfig check in parseiOSAnnotations():
// Add to map before ios check to enable fallback crawling for libs without ios config
map[libraryName] = map[libraryName] || {
library,
modules: {},
components: {},
};
const iosConfig = library?.config?.ios;
if (!iosConfig) {
continue; // Skip processing ios config, but library is already in map
}
// ... rest of processing
}
This ensures all libraries using the "New API" path are available for fallback crawling in generateRCTThirdPartyComponents.js, and their components are correctly attributed to the library rather than the app.
Steps to reproduce
- Install a library with minimal codegenConfig (e.g., @shopify/flash-list@1.8.3)
- Verify the library's package.json has:
"codegenConfig": {
"name": "rnflashlist",
"type": "components",
"jsSrcsDir": "./src/specs"
}
- Add an app-level codegenConfig with ios.componentProvider:
"codegenConfig": {
"name": "AppSpecs",
"type": "all",
"jsSrcsDir": "specs",
"ios": {
"componentProvider": {
"ExampleView": "RCTExampleView"
}
}
}
- Run cd ios && pod install
- Check ios/build/generated/ios/RCTThirdPartyComponentsProvider.mm
- Observe that Flash List components (AutoLayoutView, CellContainer) are missing
React Native Version
0.81.5
Affected Platforms
Build - MacOS
Areas
Codegen
Output of npx @react-native-community/cli info
System:
OS: macOS 15.7.3
CPU: (11) arm64 Apple M3 Pro
Memory: 208.45 MB / 36.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.17.0
path: /Users/ivangarcia/.nvm/versions/node/v22.17.0/bin/node
Yarn:
version: 3.6.4
path: /Users/ivangarcia/.nvm/versions/node/v22.17.0/bin/yarn
npm:
version: 10.9.2
path: /Users/ivangarcia/.nvm/versions/node/v22.17.0/bin/npm
Watchman:
version: 2025.03.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/ivangarcia/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.1
- iOS 26.1
- macOS 26.1
- tvOS 26.1
- visionOS 26.1
- watchOS 26.1
Android SDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.25410.109.2511.13665796
Xcode:
version: 26.1.1/17B100
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.15
path: /usr/bin/javac
Ruby:
version: 3.4.3
path: /Users/ivangarcia/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
Configuring the target with the New Architecture
[Codegen] Analyzing /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/package.json
[Codegen] Searching for codegen-enabled libraries in the app.
[Codegen] Found ReproducerApp
[Codegen] Searching for codegen-enabled libraries in react-native.config.js
[Codegen] Found @shopify/flash-list
[Codegen] Found react-native-safe-area-context
[Codegen] Processing AppSpecs
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing rnflashlist
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, tvos for rnflashlist
[Codegen] Processing safeareacontext
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos, visionos for safeareacontext
[Codegen] Generating Native Code for AppSpecs - ios
[Codegen] Generated artifacts: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactCodegen
[Codegen] Generating Native Code for rnflashlist - ios
[Codegen] Generated artifacts: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactCodegen
[Codegen] Generating Native Code for safeareacontext - ios
[Codegen] Generated artifacts: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactCodegen
[Codegen] Generating RCTThirdPartyComponentsProvider.h
[Codegen] Generated artifact: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactCodegen/RCTThirdPartyComponentsProvider.h
[Codegen] Generating RCTThirdPartyComponentsProvider.mm
[Codegen] Generated artifact: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactCodegen/RCTThirdPartyComponentsProvider.mm
[Codegen] Generating RCTModulesProvider.h
[Codegen] Generated artifact: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactCodegen/RCTModuleProviders.h
[Codegen] Generating RCTModuleProviders.mm
[Codegen] Generated artifact: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactCodegen/RCTModuleProviders.mm
[Codegen] Generating RCTAppDependencyProvider
[Codegen] Generated artifact: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactAppDependencyProvider/RCTAppDependencyProvider.h
[Codegen] Generated artifact: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactAppDependencyProvider/RCTAppDependencyProvider.mm
[Codegen] Generated podspec: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactAppDependencyProvider/ReactAppDependencyProvider.podspec
[Codegen] Generated podspec: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/ReactCodegen/ReactCodegen.podspec
[Codegen] Generating Package.swift
[Codegen] Generated artifact: /Users/ivangarcia/Development/thirdPartyProviders-crawl/ReproducerApp/ios/build/generated/ios/Package.swift
[Codegen] Done.
Analyzing dependencies
Downloading dependencies
Generating Pods project
MANDATORY Reproducer
https://github.com/ivngar/thirdPartyProviders-crawl/tree/example-failing-to-crawl
Screenshots and Videos
Expected codegen crawling missing due to @shopify/flash-list missing on the parseiOSAnnotations map
Expected codegen with the fix that adds it to the map before the iosConfig check

Description
Libraries with minimal codegenConfig (containing only name, type, jsSrcsDir) but no explicit ios.components or ios.componentProvider are not properly included in the generated RCTThirdPartyComponentsProvider during iOS codegen.
This affects libraries like @shopify/flash-list or braze that rely on the fallback file crawling mechanism.
Expected Behavior
Libraries with type: "components" should participate in fallback file crawling even without explicit ios.components config. The crawling mechanism is specifically designed for libraries that don't explicitly declare their native mappings.
Actual Behavior
Scenario 1: App has empty ios:
Library components are found but incorrectly attributed to the app instead of the library
Example: @"AutoLayoutView": NSClassFromString(@"AutoLayoutViewComponentView"), // myapp
This happens because the app gets crawled, and the file scanner recursively scans node_modules/
Scenario 2: App has populated ios:
Library components are completely missing from the generated file
The app goes to "Old API" path (which never crawls), and affected libraries are skipped in parseiOSAnnotations() before being added to the crawl list
Proposed Fix
Move the library initialization before the
iosConfigcheck inparseiOSAnnotations():This ensures all libraries using the "New API" path are available for fallback crawling in generateRCTThirdPartyComponents.js, and their components are correctly attributed to the library rather than the app.
Steps to reproduce
React Native Version
0.81.5
Affected Platforms
Build - MacOS
Areas
Codegen
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://github.com/ivngar/thirdPartyProviders-crawl/tree/example-failing-to-crawl
Screenshots and Videos
Expected codegen crawling missing due to @shopify/flash-list missing on the
parseiOSAnnotationsmapExpected codegen with the fix that adds it to the map before the
iosConfigcheck