用cocoapods创建吊舱失败 [英] Creating a pod with cocoapods fails

查看:55
本文介绍了用cocoapods创建吊舱失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试使用 pod lib create Test 创建一个pod,并使用了所有默认设置。但是,当它问完我的问题时,我得到:

I've just tried to create a pod using pod lib create Test and went with all the defaults. However, when it is done asking me questions I get:


在新库中运行pod安装。

Running pod install on your new library.

[!]在项目目录中找不到`Podfile'。

[!] No `Podfile' found in the project directory.

王牌!

我们将通过在Xcode中打开项目来开始您的工作。

打开'Test / Example / Test'

文件/用户/ macattack /文档/Xcode/Test/Example/Test.xcworkspace不存在。

Ace! you're ready to go!
We will start you off by opening your project in Xcode
open 'Test/Example/Test'
The file /Users/macattack/Documents/Xcode/Test/Example/Test.xcworkspace does not exist.

我不知道我在做什么我做错了。

I don't understand what I've done wrong.

我正在使用XCode 8,cocoapods 1.1.0.rc.2。

I'm using XCode 8, cocoapods 1.1.0.rc.2.

推荐答案

以下内容适用于Cocoapods 1.1.0.rc.2 版本。



您没有做错任何事情。这是一个预发行版本,只需几个步骤。
Podfile已经存在,但是在Example文件夹中。打开终端,进入示例文件夹:

Following is working on Cocoapods 1.1.0.rc.2 version.

You haven't done anything wrong. It's a pre-release version, just a few more steps required. Podfile is already there, but in the Example folder. Open terminal, proceed to Example folder:

cd [path]

您只需将文件夹拖放到 cd字母后即可粘贴路径。
然后只需运行 pod install
打开工作区,Xcode将提示您更新到上一个Swift语法版本并更新version属性。

You can just drag&drop the folder after 'cd' letters to paste the path. Then just run pod install. Open workspace, Xcode will prompt you to update to last Swift syntax version and update version property.

如果您使用的是 Swift 3 ,则有另一种方法,由作者建议(问题5841 )。

If you are using Swift 3 there is another option, suggested by authors (Issue 5841).


  1. 在pod父文件夹中创建一个.swift-version文件。运行 echo 3.0>> .swift-version

  2. 使用 pod lib创建pod并创建[pod名称]

  3. 进入pod Example文件夹并运行 pod install

  1. Create a .swift-version file in pod parent folder. Run echo "3.0" >> .swift-version
  2. Create pod with pod lib create [pod name].
  3. Proceed to pod Example folder and run pod install

希望有帮助!

Artem

Hope it helps!
Artem

这篇关于用cocoapods创建吊舱失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆