问题
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).
- Create a .swift-version file in pod parent folder. Run
echo "3.0" >> .swift-version
- Create pod with
pod lib create [pod name]
. - Proceed to pod Example folder and run
pod install
Hope it helps!
Artem
来源:https://stackoverflow.com/questions/39695670/creating-a-pod-with-cocoapods-fails