4

I'm having an error that only happens to me. My colleagues don't get the same error and we share the same code. I'm trying to pod install but I'm getting this error:

Invalid Podfile file: syntax error, unexpected end-of-input, expecting keyword_end.

My pod version is: 1.5.3

Here is the link to my pod file: https://gist.github.com/brunocuratio/6240bcaf69adcfae5c9026086b466cb7

Gleb A.
  • 1,180
  • 15
  • 24
Bruno Lopes Bacelar
  • 115
  • 1
  • 2
  • 14

3 Answers3

4

The first two if statements in the post_install hook seem to have their ends missing. This should work:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'NMessenger'
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '3.0'
            end
        end
        if target.name == 'Kingfisher'
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.2'
            end
        end
        if target.name == 'PopupDialog'
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.2'
            end
        end
    end
end
Gleb A.
  • 1,180
  • 15
  • 24
0

When I had this error

[!] Invalid Podfile file: syntax error, unexpected end, expecting end-of-input. What worked for me was

  1. I had removed the Podfile from the project folder which had an error and then
  2. Opened and added all the necessary dependencies in the new Podfile, then
  3. Did pod install on the terminal and the error had gone.

May work for some. Good luck !!

Manoj Daswani
  • 581
  • 3
  • 5
-1

Just delete the Podfile and build again. It should create a new one without any issues.

JMS
  • 1
  • 1