iOS解决Missing flutter_post_install

背景:flutter sdk 从3.0.5到3.3.4,升级也很简单终端输入flutter upgrade,回车后等待下载完成即可,在混合工作下pod install就报错了。

报错内容:

Add `flutter_post_install(installer)` to your Podfile `post_install` block to build Flutter plugins:

post_install do |installer|
  flutter_post_install(installer)
end

[!] Invalid `Podfile` file: Missing `flutter_post_install(installer)` in Podfile `post_install` block.

 #  from /Users/adong/Documents/workspace/ios/myapp/Podfile:60
 #  -------------------------------------------
 #  # 引入flutter
 >  install_all_flutter_pods(flutter_application_path)
 #
 #  -------------------------------------------

解决方法很简单:
在podfile结尾添加

target 'myapp' do
// 用的各sdk
end
// 新增的配置
post_install do |installer|
  flutter_post_install(installer) if defined?(flutter_post_install)
end

原文出处

你可能感兴趣的:(iOS解决Missing flutter_post_install)