我将我的图书馆推向了 cocoa pod 。现在它有 1.0.1 版:
pod spec lint USBDeviceSwift.podspec
pod trunk push USBDeviceSwift.podspec
一切正常,但如果我没有安装版本:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'testusb' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for testusb
pod 'USBDeviceSwift'
end
它安装了旧包 0.0.1。如果我再次尝试推送它,我会得到:
[!] 无法接受重复条目:USBDeviceSwift (1.0.1)
'USBDeviceSwift', '~>1.0.1'
- 运行良好
最佳答案
这不是你的podspec的问题,而是你如何在你的示例项目中使用它。发出 pod install
不会升级之前安装的 pod 的版本。保存在 Podfile.lock
中的版本被再次下拉。如果你想升级你的 pod,你应该明确地使用 pod update [USBDeviceSwift]
。
关于ios - Cocoa pods 如果没有版本安装,它会安装旧包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45488496/