Method: Pod::Xcode::XCFramework::Slice#package_type

Defined in:
lib/cocoapods/xcode/xcframework/xcframework_slice.rb

#package_typeSymbol

Returns the package type of the slice - either :framework or :library.

Returns:

  • the package type of the slice - either :framework or :library



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/cocoapods/xcode/xcframework/xcframework_slice.rb', line 71

def package_type
  @package_type ||= begin
    ext = File.extname(path)
    case ext
    when '.framework'
      :framework
    when '.a', '.dylib'
      :library
    else
      raise Informative, "Invalid XCFramework slice type `#{ext}`"
    end
  end
end