pod file 出现post_install 导致pod install 失败的问题

flutter_application_path = 'Depend/lmflutter_module'
podhelper_path = File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

podhelper_content = File.read(podhelper_path);
podhelper_post_isntall = "post_install do |installer|";

if podhelper_content.scan(/(#{podhelper_post_isntall})/).length > 0 then

podhelper_buffer = podhelper_content.gsub(podhelper_post_isntall, "def update_configs(installer, framework_dir)")
eval(podhelper_buffer, binding)

else
eval(File.read(podhelper_path), binding)
end

然后在post_install do |installer| 增加


屏幕快照 2019-08-28 下午4.41.14.png

就解决了。post_install 在pod file 和 podhelper.rb脚本重复的问题

你可能感兴趣的:(pod file 出现post_install 导致pod install 失败的问题)