Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoa Pod Syntax error

Im running Maverick with Cocoa pods version 0.27.1.

I've created a pod file in textedit in plain format with following text.

workspace ‘DemoWorkspace'
platform :ios, 6.0


pod 'XMPPFramework' , '~> 3.6.1'
pod 'AFNetworking' , '~> 2.0.0'
pod 'FMDB', '~> 2.1'


end

and I get the following syntax error

[!] Invalid `Podfile` file: .../Podfile:5: syntax error, unexpected tCONSTANT, expecting end-of-input
pod 'XMPPFramework' , '~> 3.6.1'
                  ^. Updating CocoaPods might fix the issue.

I dont understand whats going wrong in the above pod file.

like image 797
Saqib Saud Avatar asked Nov 01 '13 10:11

Saqib Saud


People also ask

Does CocoaPods use Ruby?

CocoaPods is built with Ruby and it will be installable with the default Ruby available on macOS. You can use a Ruby Version manager, however we recommend that you use the standard Ruby available on macOS unless you know what you're doing.


1 Answers

4 things actually:

Your format is incorrect. It should be:

pod 'XMPPFramework', '~> 3.6.1'

Remove the space between 'XMPPFramework' and ,

Secondly, the first quote on the first line isn't a correct quote:

‘DemoWorkspace'

Thirdly, you should define your platform with quotes around iOS version

platform :ios, '6.0'

Fourthly,

make sure you use a correct texteditor. As "Saqib Saud" found out, TextEdit sometimes messes with use of quotes <=> curly quotes.

I recommend Sublime Text or Nano

like image 135
Thomas Keuleers Avatar answered Sep 20 '22 22:09

Thomas Keuleers