Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上传ipa后显示的图标模糊,发送到钉钉群的通知中图片无法显示 #279

Open
JsonKit opened this issue Mar 28, 2020 · 1 comment

Comments

@JsonKit
Copy link

JsonKit commented Mar 28, 2020

使用命令行工具上传ipa包后,fir里面显示的图标模糊,webhook发送到钉钉群里的通知上图标无法显示.但是手动上传的ipa包一切正常

@jicheng1014
Copy link
Collaborator

jicheng1014 commented Mar 28, 2020

这个图标问题也困扰了我很久 求各位大神的 fork => pr

目前 ipa 文件的选取 icon 的逻辑在这里

            info['CFBundleIcons']['CFBundlePrimaryIcon']['CFBundleIconFiles'].each do |name|
              icons << get_image(name)
              icons << get_image("#{name}@2x")
            end

https://github.com/FIRHQ/fir-cli/blob/master/lib/fir/util/parser/ipa.rb#L122

之后挑出文件大小最大的

    def icon_file_path
      if options[:specify_icon_file].blank?
        app_info[:icons].max_by { |f| File.size(f) }
      else
        File.absolute_path(options[:specify_icon_file])
      end
    end

https://github.com/FIRHQ/fir-cli/blob/ec824e15ec55bc4a5a870f8570aa400dfab463b3/lib/fir/util/app_uploader.rb#L38

主要我对图标的准确提取确实研究不够 欢迎fork代码, 修改后发 pr

另外正如您在上面看到的 也支持 specify_icon_file 直接导入图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants