Skip to content

Commit 5eed812

Browse files
committed
update comment
1 parent e8edb3f commit 5eed812

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/react-native/scripts/react_native_pods.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,11 @@ def react_native_post_install(
539539
rn_relative_to_pods = rn_real.relative_path_from(pods_dir_real)
540540
ReactNativePodsUtils.set_build_setting(installer, build_setting: "REACT_NATIVE_PATH", value: File.join("${PODS_ROOT}", rn_relative_to_pods.to_s))
541541
# Store the Podfile directory as a build setting so that shell scripts can
542-
# locate it without relying on PODS_ROOT/.. (breaks when Pods/ is a symlink).
543-
# Use Xcode variable substitution per-project so the value persisted in
544-
# project.pbxproj is portable across machines.
542+
# locate it without hardcoding an absolute path. Use Xcode variable
543+
# substitution per-project so the value persisted in project.pbxproj is
544+
# portable across machines: $(SRCROOT) is the Podfile dir for user projects
545+
# (also avoids the PODS_ROOT/.. traversal that breaks when Pods/ is a
546+
# symlink), and $(SRCROOT)/.. for the Pods project.
545547
installer.aggregate_targets.map(&:user_project).uniq(&:path).each do |user_project|
546548
user_project.build_configurations.each do |config|
547549
config.build_settings['PODFILE_DIR'] = '$(SRCROOT)'

0 commit comments

Comments
 (0)