【问题标题】:Unable to work CocoaPods无法使用 CocoaPods
【发布时间】:2016-04-23 16:45:30
【问题描述】:

我正在上一门在线 Objective-C 课程,但遇到了以下问题: 我似乎已经通过终端安装了 CocoaPods。

当我去安装 CocoaPods 时,终端中显示此文本:“Successfully installed cocoapods-0.39.0 Parsing documentation for cocoapods-0.39.0 1 gem installed”

然后我继续下面的例子:

1) 我在 Xcode 中输入:pod 'SAMGradientView' into 'podfile'。

2) 重新打开终端。

3) 然后我在终端中输入“cd”,然后将示例 Xcode 项目文件拖到终端。然后我按下回车,什么也没发生。

【问题讨论】:

  • 您的问题与 iOS 或 Objective-C 无关。请使用正确的标签。

标签: cocoapods


【解决方案1】:

在编辑完 podfile 后,您需要在终端发出命令“pod install”来安装 pod。

link 中提供了安装 cocoapod 和与 xcode 项目集成的详细说明。

【讨论】:

    【解决方案2】:

    请按照以下步骤将 cocoa-pods 安装到您的项目中。

    //if cocoa-pods is not installed in your system else skip first step
    
    Step 1.$ sudo gem install cocoapods
    
    Step 2.change directory to xcode project in terminal
    
    Step 3.$ pod init
    
    Step 4.$ open -a Xcode Podfile
    
    Step 5.insert your pod library( pod 'SAMGradientView') into opened pod file and save this file.
    
    Step 7. $pod install (if pod installation first time in your project)
    
    or $pod update (to update existing pods)
    

    【讨论】:

      猜你喜欢
      • 2016-07-11
      • 2014-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-14
      • 2018-04-20
      • 2023-03-24
      相关资源
      最近更新 更多