【问题标题】:Problems installing/working with DCKit on XCode/Swift在 XCode/Swift 上安装/使用 DCKit 时出现问题
【发布时间】:2016-10-26 19:05:17
【问题描述】:

我已经通过终端在我的 Macbook 上成功下载并安装了 Cocoapods。然后我“cd”到包含我的 .xcodeproj 的目录,并在终端中创建一个新的 pod 'pod init'。我通过取消注释平台:ios,'9.0'来编辑Xcode中的'Podfile' 并添加 'pod 'DCKit', '~> 1.0'' 所以它看起来像:

# Uncomment the next line to define a global platform for your project
    platform :ios, '9.0'

    target 'myApp' do
       use_frameworks!
       pod 'DCKit', '~> 1.0'

    target 'myAppTests' do
       inherit! :search_paths

    end

    target 'myAppUITests' do
      inherit! :search_paths

    end

  end

我保存文件并退出 Xcode。然后我在终端中“安装 pod”,获取所有成功消息:

“Pod 安装完成!Podfile 中有 1 个依赖项,总共安装了 1 个 pod。”

然后我重新打开 XCode,但我看不到或找不到 DCKit。请帮忙。我错过了什么?

【问题讨论】:

    标签: swift xcode


    【解决方案1】:

    在“pod install”之后,cocoapods 在您的同一个 .xcodeproj 目录中创建一个后缀为 .xcworkspace 的新文件。不要打开 .xcodeproj 文件,而是打开 .xcworkspace 文件,模块就可以使用了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-03-26
      • 2019-08-09
      • 1970-01-01
      • 1970-01-01
      • 2023-01-01
      • 2015-04-23
      • 2012-07-10
      相关资源
      最近更新 更多