Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit fe61c07

Browse files
committed
Support for carthage copy-frameworks
1 parent fa07b4f commit fe61c07

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/fastlane/plugin/branch/actions/setup_branch_action.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,15 @@ def update_cartfile(params, project)
289289
target = helper.target_from_project project, params[:target]
290290
target.frameworks_build_phase.add_file_reference branch_framework
291291

292-
# 5. TODO: Add to copy-frameworks build phase
292+
# 5. Add to copy-frameworks build phase
293+
carthage_build_phase = target.build_phases.find do |phase|
294+
phase.respond_to?(:shell_script) && phase.shell_script =~ /carthage\s+copy-frameworks/
295+
end
296+
297+
if carthage_build_phase
298+
carthage_build_phase.input_paths << "$(SRCROOT)/Carthage/Build/iOS/Branch.framework"
299+
carthage_build_phase.output_paths << "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Branch.framework"
300+
end
293301

294302
# 6. Check if Carthage folder is under SCM
295303
carthage_folder_path = File.expand_path "../Carthage", cartfile_path

0 commit comments

Comments
 (0)