Pod更新未获得Pod的最新版本

时间:2019-10-01 01:40:42

标签: ios swift cocoapods podfile

Cocoapods和Xcode均为最新版本

我有一个Pod,它的存储库是直接链接到我的Podfile中,并指定使用1.5.0版(已在Github上发布为版本)。但是,每当我运行pod install和pod update时,Cocoapods都会继续获取我的repo(以前的Github版本)的版本1.4.1。

这是我的Podfile的相关行:

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

我尝试删除Podfile.lock并重新下载Pod,并且确保将Pod的最新版本实际推送到Github。

2 个答案:

答案 0 :(得分:1)

在不知道使用哪个pod的情况下,也看不到使用确切版本的代码的情况下,很难分辨出什么地方出了错。

但是我会运行<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#FF0"> <view android:layout_width="144dp" android:layout_height="144dp" android:background="#F0F"> </view> </LinearLayout> 然后运行pod repo update

这会将您的本地Pod更新到最新的可用版本,然后在正确设置的前提下安装正确的Pod版本。

版本的Cocoapod文档:

pod install

答案 1 :(得分:0)

尝试一下:

2019-10-01 2:00:00

如果找不到标记,则可能是标记版本中的pod 'podName', :git => 'git repo', :tag => '1.5.0' 文件中存在错误。

但是,您仍然可以像这样安装代码:

.podspec
相关问题