обновление pod не получает самую последнюю версию pod - PullRequest
0 голосов
/ 01 октября 2019

Cocoapods и Xcode являются последней версией

У меня есть модуль, репо которого я связываю прямо в моем подфайле, и указывающий использовать версию 1.5.0 (которая была выпущена как версия на Github),Однако всякий раз, когда я запускаю pod install и pod update, Cocoapods продолжает загружать версию 1.4.1 моего репо (предыдущего выпуска Github).

Вот соответствующая строка моего подфайла:

pod 'podName', :git=> 'git repo'

Я пытался удалить Podfile.lock и перезагружать модули, и я убедился, что самая последняя версия модуля фактически передана в Github.

Ответы [ 2 ]

1 голос
/ 01 октября 2019

Не зная, какой модуль и видя ваш код для использования точной версии, трудно сказать, что не так.

Но я бы запустил pod repo update Затем запустил pod install

Thisобновит ваши локальные модули до последних доступных версий, а затем установит правильную версию модуля, если вы правильно ее настроите.

Документация Cocoapod по версиям:

Besides no version, or a specific one, it is also possible to use logical operators:

'> 0.1' Any version higher than 0.1
'>= 0.1' Version 0.1 and any higher version
'< 0.1' Any version lower than 0.1
'<= 0.1' Version 0.1 and any lower version
In addition to the logic operators CocoaPods has an optimistic operator ~>:

'~> 0.1.2' Version 0.1.2 and the versions up to 0.2, not including 0.2 and higher
'~> 0.1' Version 0.1 and the versions up to 1.0, not including 1.0 and higher
'~> 0' Version 0 and higher, this is basically the same as not having it.


To use the master branch of the repo:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'

To use a different branch of the repo:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'dev'

To use a tag of the repo:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.1.1'

Or specify a commit:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :commit => '0f506b1c45'
0 голосов
/ 01 октября 2019

Попробуйте это:

pod 'podName', :git => 'git repo', :tag => '1.5.0'

Если он не может найти тег, возможно, у вас есть ошибка в файле .podspec внутри теговой версии.

Однако вы бывсе еще сможете установить тег так:

pod 'podName', :git => 'git repo', :branch => '1.5.0'
...