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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容