該文件描述項目的信息。 在項目的目錄下使用終端命令建立 pod spec create PFExtension
ios
Pod::Spec.new do |s|
s.name = "PFExtension"
s.version = "0.0.1"
s.summary = "some classes extension"
s.homepage = "https://github.com/pengfei2015/PFExtension"
s.license = { :type => "MIT" }
s.author = { "xxxxxx" => "xxxxxxx@xx.com" }
s.platform = :ios
s.platform = :ios, "9.0"
s.source = { :git => "https://github.com/pengfei2015/PFExtension.git", :tag => "#{s.version}" }
s.source_files = "Soureces/*.swift"
end
複製代碼
pod lib lint
git
.swift-version
file to set the version for your Pod. For example to use Swift 2.3, run:`echo "4.0" > .swift-version` // swift版本號
複製代碼
這是由於本地建立的項目裏沒有license文件,將GitHub上的文件拉下來就行 若是建立遠程倉庫的時候忘記選擇,能夠在首頁建立文件,填入license後,右邊會有模板,選擇建立就行github
git remote add origin https://github.com/pengfei2015/PFExtension.git
git push -u origin master
複製代碼
git tag 0.0.1 // git tag -a 0.0.1 -m "備註"
git push --tags
複製代碼
pod trunk register GitHub_email 'user_name' --verbose
json
等待終端顯示成功後登錄郵箱驗證swift
pod trunk push PFExtension.podspec
緩存
rm ~/Library/Caches/CocoaPods/search_index.json
bash