Skip to content

Commit 9252802

Browse files
authoredNov 26, 2016
Update native_target.rb
1 parent 1447b78 commit 9252802

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

‎lib/xcodeproj/project/object/native_target.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,21 @@ def add_system_library(names)
361361
end
362362
alias_method :add_system_libraries, :add_system_library
363363

364+
# add tbd type
365+
#
366+
#
367+
def add_system_tbd(names)
368+
Array(names).each do |name|
369+
path = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib#{name}.tbd"
370+
files = project.frameworks_group.files
371+
unless reference = files.find { |ref| ref.path == path }
372+
reference = project.frameworks_group.new_file(path, :sdk_root)
373+
end
374+
frameworks_build_phase.add_file_reference(reference, true)
375+
reference
376+
end
377+
end
378+
alias_method :add_system_tbds, :add_system_tbd
364379
public
365380

366381
# @!group AbstractObject Hooks

0 commit comments

Comments
 (0)
Please sign in to comment.