Class: Pod::PodTarget
- Inherits:
-
Object
- Object
- Pod::PodTarget
- Includes:
- CocoapodsCatalystSupport::TargetUtils
- Defined in:
- lib/cocoapods-catalyst-support/pod/pod_target.rb
Instance Method Summary collapse
Methods included from CocoapodsCatalystSupport::TargetUtils
Instance Method Details
#frameworks ⇒ Object
27 28 29 30 31 |
# File 'lib/cocoapods-catalyst-support/pod/pod_target.rb', line 27 def frameworks return file_accessors.flat_map do |accessor| accessor.spec_consumer.frameworks.map do |name| PodDependency.newFramework name end + accessor.spec_consumer.libraries.map do |name| PodDependency.newLibrary name end end end |
#resources ⇒ Object
7 8 9 10 11 |
# File 'lib/cocoapods-catalyst-support/pod/pod_target.rb', line 7 def resources resources = file_accessors.flat_map do |accessor| accessor.resources end.map do |path| "#{path.basename}" end bundles = file_accessors.flat_map do |accessor| accessor.resource_bundles end.flat_map do |dic| dic.keys end.map do |s| s + ".bundle" end return resources + bundles end |
#vendor_products ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/cocoapods-catalyst-support/pod/pod_target.rb', line 13 def vendor_products return file_accessors.flat_map do |accessor| accessor.vendored_frameworks + accessor.vendored_libraries end.map do |s| s.basename end.map do |s| name = "#{s}" if name.include? "framework" PodDependency.newFramework name.sub(".framework", "").sub(".xcframework", "") else PodDependency.newLibrary name.sub("lib", "").sub(".a", "") end end end |