read_ipa 0.4.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -4
- data/lib/read_ipa/info_plist.rb +15 -12
- data/lib/read_ipa/ipa_file.rb +15 -11
- data/lib/read_ipa/plist_binary.rb +1 -1
- data/test/test_read_ipa.rb +2 -2
- metadata +38 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9c09babdbd70e8d8d06ec57c7d2b96fd2bb05539623db2a31d282b8a70dbee94
|
4
|
+
data.tar.gz: 99c5b8ae87c6acc8300cbc203df69b7950bc5ac1bb8882097c64912d55d91e76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05db356113ebda7f383220f49d0fe9401a5128db9d814e50100741272b2bfcad693df180996d87520e224fb3f1f7b75adb4ffa9da142cc3f32d80f36353dfba4
|
7
|
+
data.tar.gz: 170ef1c97837fa047d428dc88313e472063fe059009335888f9b1dce0bef81e20a6f2bb84892c8ce767672aa751c28c998a99ee707a42b64538ea79cd01c4464
|
data/README.md
CHANGED
data/lib/read_ipa/info_plist.rb
CHANGED
@@ -19,19 +19,15 @@ module ReadIpa
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def target_os_version
|
22
|
-
@plist["DTPlatformVersion"].match(/[\d\.]*/)[0]
|
22
|
+
@plist["DTPlatformVersion"].match(/[\d\.]*/)[0] if @plist["DTPlatformVersion"]
|
23
23
|
end
|
24
24
|
|
25
25
|
def minimum_os_version
|
26
|
-
@plist["MinimumOSVersion"].match(/[\d\.]*/)[0]
|
26
|
+
@plist["MinimumOSVersion"].match(/[\d\.]*/)[0] if @plist["MinimumOSVersion"]
|
27
27
|
end
|
28
28
|
|
29
29
|
def url_schemes
|
30
|
-
|
31
|
-
@plist["CFBundleURLTypes"][0]["CFBundleURLSchemes"]
|
32
|
-
else
|
33
|
-
[]
|
34
|
-
end
|
30
|
+
@plist.dig('CFBundleURLTypes', 0, 'CFBundleURLSchemes') || []
|
35
31
|
end
|
36
32
|
|
37
33
|
def icon_files
|
@@ -61,15 +57,22 @@ module ReadIpa
|
|
61
57
|
end
|
62
58
|
|
63
59
|
def for_ipad?
|
64
|
-
return
|
65
|
-
|
60
|
+
return false if @plist["UIDeviceFamily"].nil?
|
61
|
+
if @plist["UIDeviceFamily"].kind_of?(Array)
|
62
|
+
return true if @plist["UIDeviceFamily"] && (@plist["UIDeviceFamily"].include?(2) || @plist["UIDeviceFamily"].include?("2"))
|
63
|
+
else
|
64
|
+
return true if @plist["UIDeviceFamily"] && (@plist["UIDeviceFamily"] == 2 || @plist["UIDeviceFamily"] == "2")
|
65
|
+
end
|
66
66
|
return false
|
67
67
|
end
|
68
68
|
|
69
69
|
def for_iphone?
|
70
|
-
return true if @plist["UIDeviceFamily"]
|
71
|
-
|
72
|
-
|
70
|
+
return true if @plist["UIDeviceFamily"].nil?
|
71
|
+
if @plist["UIDeviceFamily"].kind_of?(Array)
|
72
|
+
return true if @plist["UIDeviceFamily"].include?(1) || @plist["UIDeviceFamily"].include?("1")
|
73
|
+
else
|
74
|
+
return true if @plist["UIDeviceFamily"] == 1 || @plist["UIDeviceFamily"] == "1"
|
75
|
+
end
|
73
76
|
return false
|
74
77
|
end
|
75
78
|
end
|
data/lib/read_ipa/ipa_file.rb
CHANGED
@@ -9,18 +9,9 @@ module ReadIpa
|
|
9
9
|
attr_accessor :plist, :file_path
|
10
10
|
def initialize(file_path)
|
11
11
|
self.file_path = file_path
|
12
|
+
@app_folder = get_app_folder
|
12
13
|
@zipfile = Zip::File.open(file_path)
|
13
|
-
@zipfile.
|
14
|
-
if /.*\.app\/Info\.plist$/ =~ entry.to_s
|
15
|
-
@app_folder = entry.to_s.gsub(/Info\.plist$/, '')
|
16
|
-
break
|
17
|
-
end
|
18
|
-
end
|
19
|
-
if @app_folder.nil?
|
20
|
-
raise "Could not identify Main app Folder"
|
21
|
-
end
|
22
|
-
|
23
|
-
plist_str = @zipfile.read(@app_folder + "Info.plist")
|
14
|
+
plist_str = @zipfile.read(@app_folder + 'Info.plist')
|
24
15
|
@info_plist = InfoPlist.new(plist_str)
|
25
16
|
|
26
17
|
cf_plist = CFPropertyList::List.new(data: plist_str, format: CFPropertyList::List::FORMAT_AUTO)
|
@@ -88,6 +79,19 @@ module ReadIpa
|
|
88
79
|
read_file(executable_file_name)
|
89
80
|
end
|
90
81
|
|
82
|
+
def get_app_folder
|
83
|
+
plist_path = nil
|
84
|
+
Zip::File.foreach(file_path) do |entry|
|
85
|
+
if /.*\.app\/Info\.plist$/ =~ entry.to_s
|
86
|
+
plist_path = entry
|
87
|
+
break
|
88
|
+
end
|
89
|
+
end
|
90
|
+
app_folder = plist_path.to_s.gsub(/Info\.plist$/, '')
|
91
|
+
raise "Could not identify Main app Folder" if app_folder.nil?
|
92
|
+
app_folder
|
93
|
+
end
|
94
|
+
|
91
95
|
def mobile_provision_file
|
92
96
|
read_file("embedded.mobileprovision")
|
93
97
|
end
|
data/test/test_read_ipa.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'test_helper'
|
2
2
|
require 'digest'
|
3
3
|
require 'read_ipa'
|
4
4
|
|
@@ -45,7 +45,7 @@ class ReadIpaTest < Minitest::Test
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def test_icon
|
48
|
-
assert_equal("
|
48
|
+
assert_equal("3e4ed7f5a30280009fac972f8d4c90d2a91f46b94e7d687a20b8bfedad5ab62a",
|
49
49
|
Digest::SHA256::hexdigest(@ipa_file.icon_file))
|
50
50
|
end
|
51
51
|
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: read_ipa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marvin Killing
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: minitest
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,47 +39,47 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: simplecov
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: apple_png
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.3.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.3.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: CFPropertyList
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
75
|
+
version: '3.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
82
|
+
version: '3.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: chunky_png
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.2'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubyzip
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.0'
|
111
125
|
description: Extract metadata from iOS packages such as the app name, the app icons
|
112
126
|
or the binary file. This is a diverging fork of github.com/schlu/Ipa-Reader.
|
113
127
|
email: marvinkilling@gmail.com
|
@@ -126,24 +140,23 @@ homepage: https://github.com/playtestcloud/read_ipa
|
|
126
140
|
licenses:
|
127
141
|
- MIT
|
128
142
|
metadata: {}
|
129
|
-
post_install_message:
|
143
|
+
post_install_message:
|
130
144
|
rdoc_options: []
|
131
145
|
require_paths:
|
132
146
|
- lib
|
133
147
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
148
|
requirements:
|
135
|
-
- - "
|
149
|
+
- - ">="
|
136
150
|
- !ruby/object:Gem::Version
|
137
|
-
version: '2'
|
151
|
+
version: '2.3'
|
138
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
153
|
requirements:
|
140
154
|
- - ">="
|
141
155
|
- !ruby/object:Gem::Version
|
142
156
|
version: '0'
|
143
157
|
requirements: []
|
144
|
-
|
145
|
-
|
146
|
-
signing_key:
|
158
|
+
rubygems_version: 3.2.32
|
159
|
+
signing_key:
|
147
160
|
specification_version: 4
|
148
161
|
summary: Read metadata from iOS IPA package files
|
149
162
|
test_files:
|