Class: Xcodeproj::Project::Object::AbstractTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/react_native_util/core_ext/xcodeproj.rb

Instance Method Summary collapse

Instance Method Details

#subspecs_from_librariesObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/react_native_util/core_ext/xcodeproj.rb', line 7

def subspecs_from_libraries
  libs = frameworks_build_phase.files.select do |file|
    path = file.file_ref.pretty_print
    next false unless /^lib(.+)\.a$/.match?(path)
    next false if path == 'libReact.a'

    # project is a ReactNativeUtil::Project
    # #static_libs is from the Libraries group
    project.static_libs.include?(path)
  end

  libs.map do |lib|
    root = lib.file_ref.pretty_print.sub(/^lib(.*)\.a$/, '\1')

    case root
    when 'RCTLinking'
      'RCTLinkingIOS'
    else
      root
    end
  end
end