From 8bd78d519de52ad3c044aa22220fbc6f8bc1dd57 Mon Sep 17 00:00:00 2001 From: Jay Kim Date: Tue, 19 Mar 2024 10:28:45 +0900 Subject: [PATCH] fix: ensure real path for header_mappings_dir If header_mappings_dir is set to symlinked path, the header directory structure is not preserved currently because cocoapods uses header's real path to find relative path from header_mappings_dir, but header_mappings_dir is not ensured to be a real path(symlinked path). --- .../xcode/pods_project_generator/pod_target_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb b/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb index c21eb8c9a7..7d60ce3359 100644 --- a/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +++ b/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb @@ -1059,7 +1059,7 @@ def add_header(file_accessor, build_file, public_headers, project_headers, priva if target.build_as_framework? && !header_mappings_dir(file_accessor).nil? && acl != 'Project' relative_path = if mapping_dir = header_mappings_dir(file_accessor) - file_ref.real_path.relative_path_from(mapping_dir) + file_ref.real_path.relative_path_from(Pathname.new(mapping_dir).realpath) else file_ref.real_path.relative_path_from(file_accessor.path_list.root) end