From 1190f300a5afd2fae0d85d6895e7d140658400aa Mon Sep 17 00:00:00 2001 From: Chris Thuyen Date: Fri, 17 Apr 2020 12:43:49 +0800 Subject: [PATCH] fix(*): static framework with xib files --- lib/cocoapods-binary-cache/pod-binary/Integration.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cocoapods-binary-cache/pod-binary/Integration.rb b/lib/cocoapods-binary-cache/pod-binary/Integration.rb index 5445068..8625d54 100644 --- a/lib/cocoapods-binary-cache/pod-binary/Integration.rb +++ b/lib/cocoapods-binary-cache/pod-binary/Integration.rb @@ -101,6 +101,13 @@ def mirror_with_symlink(source, basefolder, target_folder) path_objects = hash[name] if path_objects != nil path_objects.each do |object| + # https://github.com/grab/cocoapods-binary-cache/issues/7 + # When ".xib" files are copied to a framework, it sometimes becomes ".nib" files + # --> We need to correct the path extension + if !object.real_file_path.exist? && object.real_file_path.extname == '.xib' + object.real_file_path = object.real_file_path.sub_ext('.nib') + object.target_file_path = Pathname(object.target_file_path).sub_ext('.nib').to_path + end make_link(object.real_file_path, object.target_file_path) end end