Sha256: 32b3cf16942fbf53d596b832de812d937cb70caf61c086e331a269f549b9ac58

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

module Pod
  class Command

    # cocoapods-packager
    class Package < Command

    end

    class TYPackage < Package

      def run
        super
        self.merge_vendored_libraries
      end

      def merge_vendored_libraries
        for platform in @spec.available_platforms
          vendored_libraries = @spec.consumer(platform).vendored_libraries
          if vendored_libraries != nil
            next
          end

          UI.puts("Merge #{platform.name} vendored_libraries: #{vendored_libraries}")
          framework_path = "#{@spec.name}-#{@spec.version}/#{platform.name}/#{@spec.name}.framework/Versions/A/#{@spec.name}"
          library_path = "#{@spec.name}-#{@spec.version}/#{platform.name}/lib#{@spec.name}.a"
          binary_path = @library ? library_path : framework_path
          for vendored_library in vendored_libraries
            Dir.glob(vendored_library) do |lib|
              exitCode = system("libtool -static -o \"#{binary_path}\" \"#{binary_path}\" \"#{lib}\"")
              if exitCode != 0
                exit(-1)
              end
            end
          end
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cocoapods-tuya-oss-publish-0.1.5 lib/cocoapods-tuya-oss-publish/command/package.rb
cocoapods-tuya-oss-publish-0.1.4 lib/cocoapods-tuya-oss-publish/command/package.rb
cocoapods-tuya-oss-publish-0.1.2 lib/cocoapods-tuya-oss-publish/command/package.rb
cocoapods-tuya-oss-publish-0.1.0 lib/cocoapods-tuya-oss-publish/command/package.rb
cocoapods-tuya-oss-publish-0.0.1 lib/cocoapods-tuya-oss-publish/command/package.rb