pod file 出现post_install 导致pod in

2019-08-28  本文已影响0人  able_

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脚本重复的问题

上一篇下一篇

猜你喜欢

热点阅读