Class: Xcodeproj::Project::Object::PBXNativeTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-alexandria/rome/compiler.rb

Instance Method Summary collapse

Instance Method Details

#all_dependenciesObject



80
81
82
83
84
85
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 80

def all_dependencies
  dependencies
    .filter { |d| d.target.is_native? && !d.target.is_bundle? }
    .map { |d| [d.target] + d.target.all_dependencies }
    .flatten.uniq
end

#is_bundle?Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 76

def is_bundle?
  product_type == 'com.apple.product-type.bundle'
end

#product_pathObject

Note: using target.product_name is wrong in some cases (Cocoapods project generation bug) See github.com/CocoaPods/CocoaPods/issues/8007



89
90
91
92
93
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 89

def product_path
  extension = File.extname(product_reference.path)
  module_name = resolved_build_setting('PRODUCT_MODULE_NAME', true).values[0]
  "#{module_name}#{extension}"
end