This may not fix the issue, finally i find we also need change the template file in path/to/flutter-sdk/packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/podhelper.rb.tmpl, Then replace File.exists? with File.exist?