Creating a pod with cocoapods fails

一个人想着一个人 提交于 2020-01-05 04:17:11

问题


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:

Running pod install on your new library.

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

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.

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


回答1:


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]

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.

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

  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

Hope it helps!
Artem



来源:https://stackoverflow.com/questions/39695670/creating-a-pod-with-cocoapods-fails

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!