app-info 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2c78a4901456e1d50dc468314d4fa12e9b66db13e3f4678f5a4f371dddda03e
4
- data.tar.gz: 3493755f61ca80721c9fee684a06dc5922d0427695ce1ef1f1b1c44739686da5
3
+ metadata.gz: e3f9fde9fba3ff6b0653e7ebf7c122c2dc290aaa81be4ce52d6fd1853fc9963e
4
+ data.tar.gz: 3a18e33551bce9cb9155779e56f943c8df6f7528807410e66ec897d8f64a57c6
5
5
  SHA512:
6
- metadata.gz: 67bca698f1e7dd6cde75a3d57776a0d2cd95ab6cf5c156d101f76b333535f763dfc55051d1f975fec499e09a0a66b7b0f6c6855877bdad4100be243f9e2be001
7
- data.tar.gz: d07d95a0d1481ba711a953f09bfcf966f7827e9c0b0d010fbf16bfc7c16a39ef05950b9fa9c5a2e34a0b117a995d9182b56d2f19fd9b98f40eea6e4d084734bb
6
+ metadata.gz: 1ed9868f7cde0c52565cb9433f812c51645c5d01ea5501770d8f09be3ab4ed06ff0a09baf45c8e69d09c3e011a3376d2268de71988bcf89d363570d5c4e02872
7
+ data.tar.gz: aa2516f818a0e2452f960769c4ac344ab31ea87e6802e0126373f91cfe492cefa575051377cfbfaeeddcff988adf984a09d6c73cbe61a3c6a1ce6548f9bec460
data/CHANGELOG.md CHANGED
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9
9
 
10
10
  > List all changes before release a new version.
11
11
 
12
+ ## [2.8.1] (2021-12-20)
13
+
14
+ ### Fixed
15
+
16
+ - Fix no found intent filter in manifest error.
17
+
12
18
  ## [2.8.0] (2021-12-16)
13
19
 
14
20
  ### Added
@@ -216,7 +222,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
216
222
 
217
223
  - Updated dependency of CFPropertly list be a range between 2.3.4. (thanks @[cschroed](https://github.com/cschroed))
218
224
 
219
- [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.6.5..HEAD
225
+ [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.8.1..HEAD
226
+ [2.8.1]: https://github.com/icyleaf/app-info/compare/v2.8.0...v2.8.1
227
+ [2.8.0]: https://github.com/icyleaf/app-info/compare/v2.7.0...v2.8.0
220
228
  [2.7.0]: https://github.com/icyleaf/app-info/compare/v2.6.5...v2.7.0
221
229
  [2.7.0.beta5]: https://github.com/icyleaf/app-info/compare/v2.7.0.beta2...v2.7.0.beta5
222
230
  [2.7.0.beta2]: https://github.com/icyleaf/app-info/compare/v2.7.0.beta1...v2.7.0.beta2
data/README.md CHANGED
@@ -154,56 +154,67 @@ profile.enabled_capabilities
154
154
 
155
155
  ### Android
156
156
 
157
+ Accept `.aab` and `.apk` Android file.
158
+
157
159
  ```ruby
158
- apk = AppInfo.parse('android.apk')
160
+ android = AppInfo.parse('android.apk_or_aab')
159
161
 
160
162
  # get app file size
161
- apk.size
163
+ android.size
162
164
  # => 3093823
163
165
 
164
166
  # get app file size in human reable.
165
- apk.size(human_size: true)
167
+ android.size(human_size: true)
166
168
  # => 29 MB
167
169
 
168
170
  # get app release version
169
- apk.release_version
171
+ android.release_version
170
172
  # => 1.0
171
173
 
172
174
  # get app package name
173
- apk.bundle_id
175
+ android.bundle_id
174
176
  # => com.icyleaf.AppInfoDemo
175
177
 
178
+ # detect app type (It's difficult to detect phone or tablet)
179
+ android.tv?
180
+ android.wear?
181
+ android.automotive?
182
+
176
183
  # get app icons
177
- apk.icons
184
+ android.icons
178
185
  # => [{:name=>"ic_launcher.png", :file=> "/temp/dir/app/ic_launcher.png", :dimensions=>[48, 48]}, ...]
179
186
 
180
187
  # get app support min sdk version
181
- apk.min_sdk_version
188
+ android.min_sdk_version
182
189
  # => 13
183
190
 
184
191
  # get use_permissions list
185
- apk.use_permissions
192
+ android.use_permissions
186
193
  # => [...]
187
194
 
188
195
  # get activitiy list
189
- apk.activities
196
+ android.activities
190
197
  # => [...]
191
198
 
192
199
  # get service list
193
- apk.services
200
+ android.services
194
201
  # => [...]
195
202
 
196
- # get certificate list
197
- apk.certificates
198
- # => [...]
203
+ # get deep links host
204
+ android.deep_links
205
+ # => ['a.com']
199
206
 
200
- # get sign list
201
- apk.signs
207
+ # get schemes without http or https
208
+ android.schemes
209
+ # => ['appinfo']
210
+
211
+ # get sign list (only v1 sign)
212
+ android.signs
202
213
  # => [...]
203
214
 
204
- # detect app type (It's difficult to detect phone or tablet)
205
- apk.tv?
206
- apk.wear?
215
+ # get certificate list (only v1 sign)
216
+ android.certificates
217
+ # => [...]
207
218
  ```
208
219
 
209
220
  ### macOS
@@ -141,27 +141,29 @@ module AppInfo
141
141
  end
142
142
 
143
143
  def deep_links
144
- activities.each_with_object([]) do |activity, obj|
145
- intent_filters = activity.intent_filter
146
- next if intent_filters.empty?
147
-
148
- intent_filters.each do |filter|
149
- next unless filter.deep_links?
150
-
151
- obj << filter.deep_links
152
- end
153
- end.flatten.uniq
144
+ intent_filters(search: :deep_links)
154
145
  end
155
146
 
156
147
  def schemes
148
+ intent_filters(search: :schemes)
149
+ end
150
+
151
+ private
152
+
153
+ def intent_filters(search: nil)
157
154
  activities.each_with_object([]) do |activity, obj|
158
155
  intent_filters = activity.intent_filter
159
- next if intent_filters.empty?
156
+ next if intent_filters&.empty?
160
157
 
161
- intent_filters.each do |filter|
162
- next unless filter.schemes?
158
+ if search.nil? || search.empty?
159
+ obj << intent_filters
160
+ else
161
+ intent_filters.each do |filter|
162
+ exist_method = "#{search}?".to_sym
163
+ next if filter.respond_to?(exist_method) && !filter.send(exist_method)
163
164
 
164
- obj << filter.schemes
165
+ obj << filter.send(search)
166
+ end
165
167
  end
166
168
  end.flatten.uniq
167
169
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppInfo
4
- VERSION = '2.8.0'
4
+ VERSION = '2.8.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app-info
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - icyleaf
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-16 00:00:00.000000000 Z
11
+ date: 2021-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList