Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/react-native/scripts/cocoapods/autolinking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ def list_native_modules!(config_command)
config = JSON.parse(json)

packages = config["dependencies"]
ios_project_root = Pathname.new(config["project"]["ios"]["sourceDir"])
project_config = config["project"]["macos"] || config["project"]["ios"] # [macOS]
ios_project_root = Pathname.new(project_config["sourceDir"]) # [macOS]

@shirakaba shirakaba Jun 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be beneficial to divide this into ios_project_root and macos_project_root (and add macos_project_root to the return value)?

react_native_path = Pathname.new(config["reactNativePath"])
found_pods = []

packages.each do |package_name, package|
next unless package_config = package["platforms"]["ios"]
next unless package_config = package["platforms"]["macos"] || package["platforms"]["ios"] # [macOS]

name = package["name"]
podspec_path = package_config["podspecPath"]
Expand Down
Loading