Skip to content

Commit

Permalink
Merge pull request pluosi#55 from ddfork/master
Browse files Browse the repository at this point in the history
fix ios icon read bug without Assets.xcassets 's AppIcon
  • Loading branch information
tinyc-z authored May 8, 2019
2 parents 3793214 + 8e0679f commit 0d9026c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/parsers/pkg_adapter/ipa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ def parse
# # content = entry.get_input_stream.read if entry.get_input_stream.respond_to? :read
# end

provision = zip_file.glob('Payload/*.app/embedded.mobileprovision').first
provision = zip_file.glob("Payload/*.app/embedded.mobileprovision").first
@provision = provision ? ConfigParser.mobileprovision(provision.get_input_stream.read) : {}

plist = zip_file.glob('Payload/*.app/Info.plist').first
plist = zip_file.glob("Payload/*.app/Info.plist").first
@plist = plist ? ConfigParser.plist(plist.get_input_stream.read) : {}

entry = zip_file.glob('Payload/*.app/AppIcon[6,4]0x[6,4]0@*.png').last

# read icon name
appIconName = @plist["CFBundleIcons"]["CFBundlePrimaryIcon"]["CFBundleIconName"]
entry = zip_file.glob("Payload/*.app/#{appIconName}[6,4]0x[6,4]0@*.png").last

if entry
@app_icon = "#{path}/#{entry.name}"
dirname = File.dirname(@app_icon)
Expand Down Expand Up @@ -133,4 +136,4 @@ def self.plist(stream)
end
end
end
end
end

0 comments on commit 0d9026c

Please sign in to comment.