iOS開發CocoPods支援報錯: [!] Unable to accept duplicate entry for: XXXXX (0.0.1)
阿新 • • 發佈:2018-12-23
在更新開源庫的時候報錯: [!] Unable to accept duplicate entry for: XXXXX (0.0.1)
意思是:不能接受同一版本的提交
解決方案:
1、執行如下命令,紅色標示為修改後的版本
git tag 0.0.2 git push --tags git push origin master 2、修改XXXX.podspec檔案中的內容Pod::Spec.new do |s|
s.name = "xxxx"
s.version = "0.0.2"
s.summary = "一行程式碼實現省市區三級地區選擇功能
s.homepage = "https://github.com/xxx/xx"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "xx" => "[email protected]" }
s.social_media_url = "http://blog.csdn.net/xxx?viewmode=list"
s.platform = :ios, "5.0"
s.ios.deployment_target = "5.0"
s.source = { :git => "https://github.com/xxx/xxx.git", :tag => "0.0.2 " }
s.source_files = 'xxxx/*.{h,m}'
s.requires_arc = true
s.dependency "Masonry"
end
3、執行命令 pod spec lint 驗證並提交到CocoPods(提交命令: pod trunk push 庫名.podspec)