In case if you are still not able to figure it out, here is the code to add to your Podfile:
valid_target_names = ['Pods-APPNAME']
post_install do |installer|
installer.pods_project.targets.each do |target|
modify_file_for_target(target, valid_target_names)
end
end
def modify_file_for_target(target, valid_target_names)
target_name = target.name
if valid_target_names.include?(target_name)
puts "Target name: #{target_name}"
file_path = "Pods/Target Support Files/#{target_name}/#{target_name}-frameworks.sh"
puts "Target file path: #{file_path}"
text_to_find = 'source="$(readlink "${source}")"'
replacement_text = 'source="$(readlink -f "${source}")"'
if File.file?(file_path)
puts "Modifying file: #{file_path}"
file_content = File.read(file_path)
modified_content = file_content.gsub(text_to_find, replacement_text)
File.open(file_path, 'w') do |file|
file.puts(modified_content)
end
puts "Modification complete."
else
puts "Error: File not found - #{file_path}"
end
else
#puts "No change required for target: #{target_name}"
end
end