xcode - Podfile 不安装选定的分支

标签 xcode cocoapods branch podfile

您好,我正在尝试添加 https://github.com/fxm90/GradientLoadingBar/tree/feature/notch-gradient-loading-bar在我的 Xcode 项目中,但是当我指定
pod 'GradientLoadingBar', :git => 'https://github.com/fxm90/GradientLoadingBar', :branch => 'feature/notch-gradient-loading-bar'在我的 Podfile 中

不给我下载分支。我也试过 :branch => 'notch-gradient-loading-bar' ,但也没有成功。它下载了一些东西,但不是我需要的分支,我无法实现新功能 NotchGradientLoadingBar

let notchGradientLoadingBar = NotchGradientLoadingBar(height: 6)给我一个错误Use of unresolved identifier 'NotchGradientLoadingBar'

最佳答案

据我所知,似乎只有一个分支(参见 here 以供引用)。您只需要 checkout 标准分支,然后您就可以使用找到的文档实现 NotchGradientLoadingBar here .

在我的测试中,将主分支添加到您的 Xcode 项目并导入 GradientLoadingBar 后,您应该可以毫无问题地使用 let notchGradientLoadingBar = NotchGradientLoadingBar(height: 6)

关于xcode - Podfile 不安装选定的分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62341128/

相关文章:

ios - 重置按钮操作的 UITableViewCell 复选标记

xcode - 如何使用 GitHub Actions 安装私有(private) Pod?

ios - 如何在 iOS 中现有的 cocoa-pod 集中添加新库

git - 使用分支在 Git 中移动文件

xcode - 如何使用 Xcode 和 swift 2 对显示图形对象进行编码 - 表示 OS X 程序中字符串子字符串的箭头

XCode 4.2 NSManagedObject 上下文构建失败

ios - 线程 1 : EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) Relm

git - 我如何在 Git 中 pull 单个提交?

git - 在 Git 中,列出具有未推送提交的分支名称

swift - 如何在 NSMenu 中放置水平 slider (Swift 3、Xcode 8)