I'm running Cocoapods 1.1.1 at macOS Sierra and use Xcode 7.3.1
I've create Podfile in textedit in plain format with this text:
platform :ios, ‘9.3’
project ‘cd/ls/Desktop/rexpense-ios-rexpenseiOS-Rodrigo/Rexpense/Rexpense/Rexpense.xcodeproj
def common_pods
pod 'AFNetworking', '~> 2.6.1'
pod 'MagicalRecord', '~> 2.3'
pod 'SVProgressHUD', '~> 1.1'
pod 'SDWebImage', '~> 3.7.3'
pod 'Rollbar', '~> 0.1.5'
pod 'ABStaticTableViewController', '~> 1.1'
pod 'GoogleAnalytics', '~> 3.13'
end
target 'Rexpense' do
common_pods
end
and I get syntax following error:
[!] Invalid `Podfile` file: syntax error, unexpected tCONSTANT, expecting end-of-input
pod 'AFNetworking', '~> 2.6.1'
^.
# from /Users/rxasei/Podfile:23
# -------------------------------------------
# def common_pods
> pod 'AFNetworking', '~> 2.6.1'
# pod 'MagicalRecord', '~> 2.3'
# -------------------------------------------
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
Expanding on Gokul's comment, the error is absolutely correct. The quotation marks may look standard, but the unicode representation is actually different, this is to do with the way TextEdit (and indeed most other RTF text editors) handle opening and closing of quotations. There may well be an option to turn this off but I prefer to use a text editor designed for coding.
As Gokul mentions xcode will do the job fine but Sublime text is far more optimised for the job, also you then don't have a fairly resource hungry xcode running for such a simple task. Sublime text features code completion, syntax highlighting and auto indenting. It's a great text editor in my opinion. I appreciate this answer is fairly objective and I'm sure other people may have other text editors they prefer.
You can get sublime text here: https://sublimetext.com/3
If you open your podfile with ST, delete and re-type all single quotation marks, your error should go away.