I made my own cocoa pods using this tutorial. http://guides.cocoapods.org/making/making-a-cocoapod.html I pushed it to my own github repository. https://github.com/kidsid59/appExample When I tried to use it in my own sample project by making an entry in its podfile like
target "PodInstallDemoApp" do
pod ‘appExample’, :git => 'https://github.com/kidsid59/appExample.git'
end
And then tried to run "pod install" in terminal. It says :-
[!] Invalid `Podfile` file: undefined local variable or method `‘appExample’' for # <Pod::Podfile:0x007f92e111dfc0>. Updating CocoaPods might fix the issue.
Looks like its failing to identify the pod name. I already wasted lot of time in this little advice would help.
Simply run pod install (or bundle exec pod install if using bundler) to reinstall all the project's pods. This will regenerate the deleted Pods/ folder and create the correct checksum in Podfile. lock . That's it — you've now got both your changes merged, and you've fixed the merge conflict (at least, for the pods!).
Run open Podfile. Which opens the Podfile in textEdit. Add pod'CorePlot', '~> 1.4' to it and save. Run pod install -- NOTE* that is **pod update if already installed.
~> (the optimistic operator) is used when you want to specify a version 'up to next major | minor | patch'. For example: ~> 0.1.2 will get you a version up to 0.2 (but not including 0.2 and higher)
You probably have edited your Podfile
with TextEdit.app, which replace '
for "smart quotes" (‘
and ’
.
Be sure to use regular quotes ('
).
Note: You shouldn’t use TextEdit App to edit the pod file because TextEdit likes to replace standard quotes with more graphically appealing quotes. This can cause CocoaPods to get confused and display errors, so it’s best to just use Xcode or another programming text editor.
Using TextEdit App will give you following,
pod ‘AFNetworking’, ‘~> 2.5′ //notice the quotes
Use Xcode to open Podfile and you will get correct quotes as following,
pod 'AFNetworking', '~> 2.5'
Terminal Commands to open in Xcode:
$ touch Podfile //OR $ cd <parentDirectory of Podfile>
$ open -a Xcode Podfile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With