Skip to content

Commit f681a84

Browse files
committed
šŸ› Fix a bug where linking failed if project doesn't have a target named like the project
1 parent 5db2aab commit f681a84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ā€Žlink.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
project = Xcodeproj::Project.open(project_location)
2727
frameworks_group = project.groups.find { |group| group.display_name == 'Frameworks' }
2828
frameworks_group ||= project.new_group('Frameworks')
29-
default_target = project.targets.find { |target| target.to_s == default_target_name }
29+
default_target = project.targets.find { |target| target.to_s == default_target_name } || project.targets.first
3030
targets = project.targets.select { |target| (target.is_a? Xcodeproj::Project::Object::PBXNativeTarget) &&
3131
(target.product_type == "com.apple.product-type.application") &&
3232
(target.platform_name == :ios) }

0 commit comments

Comments
Ā (0)