Cocoapods

81 阅读1分钟

cocoapods 卸载

卸载Cocoapods

sudo gem uninstall cocoapods

查看本地安装过的cocopods相关东西

gem list --local | grep cocoapods

然后使用命令逐个删除

sudo gem uninstall cocoapods-core

Cocoapods podspec

Pod::Spec.new do |s|
  s.name    = 'APPLibrary'
  s.version = '1.0.0'
  s.summary = 'An APP base Framework to 
  help me start a project quickly.'

  s.description = <<-DESC 
                      APPCoreLibrary include some tools 
                      and frameworks which is required to create an normal APP.
                  * With this,so I can start write a project very quickly.
                  DESC
  
  s.homepage     = "https://xxx"  
  s.screenshots  = "https://xxx.jpg", "https://xxx.jpg"
  s.license = { :type => "MIT", :file => "LICENSE" }
  s.authors            = { "xxx" => "lxxxb@icloud.com" }

  s.swift_version = "5.0"
  // s.swift_versions = ['4.0', '4.2', '5.0', '5.1']
  
  s.ios.deployment_target = "12.0"
  s.watchos.deployment_target = "2.0"
  s.tvos.deployment_target = "9.0"
  s.osx.deployment_target = "10.10"

  s.source       = { :git => "https://github.com/xxx.git", :tag => s.version }
  s.source_files  = [
    "Sources/APPLibrary/**/*.swift",
    "Sources/APPLibrary.h"
  ]
  
//   s.source_files  = "Sources"

  s.resource_bundles = {
    'LocalizationString' => ["Sources/APPLibrary/**/*.strings"],
    'JsonFiles' => ["Sources/APPLibrary/**/*.json"]
  }

  s.dependency 'SnapKit', '~> 5.0.0'

  s.public_header_files = ["Sources/BSKAppCore.h"]
  s.requires_arc = true

  s.subspec 'PUMLogConsole' do |sub1|
    sub1.source_files  = [
      "Sources/PUMLogConsole/**/*.swift"
    ]
    sub1.dependency 'APPCoreLibrary/BSKLog'
  end

  s.subspec 'PUMLog' do |sub2|
    sub2.source_files  = [
      "Sources/PUMLog/**/*.swift"
    ]
    sub2.dependency 'APPCoreLibrary/BSKUtils'
  end

  s.subspec 'PUMUtils' do |sub3|
    sub3.source_files  = [
      "Sources/PUMUtils/**/*.swift"
    ]
  end
end