无效的“Podfile”文件:语法错误,意外的输入结束,期望keyword_end

Bru*_*lar 5 cocoapods podfile

我遇到了一个只发生在我身上的错误。我的同事没有遇到相同的错误,并且我们共享相同的代码。我正在尝试 pod install,但收到此错误:

文件无效Podfile:语法错误、意外的输入结束、期望关键字_结束。

我的 Pod 版本是:1.5.3

这是我的 pod 文件的链接:https://gist.github.com/brunocuratio/6240bcaf69adcfae5c9026086b466cb7

Gle*_* A. 4

钩子中的前两个if语句post_install似乎缺少ends。这应该有效:

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
Run Code Online (Sandbox Code Playgroud)