app-info 2.1.4 → 2.4.3

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: ec1ec092bf819b2a33bd95eabd72656e5220ae993bd28855d9b7ec11116f3470
4
- data.tar.gz: ff26401d6b6332d064479244f032539266b17fe2a490db1860a9847767d8f631
3
+ metadata.gz: d3a8120207a6e2e38bc41581e3fb1bfa8f181d9262cd5f5f2b2ef7a416bd2dd7
4
+ data.tar.gz: 00e5f7124fc1152494ab159baf8a8b737ab4651dab5e8f173c32d3a726a0836f
5
5
  SHA512:
6
- metadata.gz: 1c643af0daecb633dd2d1b2cfd6977496316cef3ff595c699b9654349cfc39bb413e411a866255737040972b0b26dc81c04b7fbd5d9748a3313190d6d3b0b32c
7
- data.tar.gz: d54160c181fba55dc99fc58963da826d55d3a817f705da220170f154e88215314b22630983de96e6bef353ea14602bd147feabbe9b920b175aff9f50d91d1f56
6
+ metadata.gz: 8e118a9412150f37e3b5675027c486b6028b09328554b4d8e3a62d83cabe828b40f25742aa8d4739fc6049a42efd1909f3811613a516a15d2fa0a2edfbea093c
7
+ data.tar.gz: 888e45ddaae86097e6eb150aa37c98294d708fa94d519dbeabfb22088f8c1ac94fecdc9aa4806966a3895e283ded8da90c8aa1685d201822129e300d87cd9f5c
data/.travis.yml CHANGED
@@ -5,4 +5,5 @@ rvm:
5
5
  - 2.4
6
6
  - 2.5
7
7
  - 2.6
8
+ - 2.7
8
9
  before_install: gem install bundler
data/CHANGELOG.md CHANGED
@@ -9,6 +9,49 @@ 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.4.3] (2021-04-12)
13
+
14
+ ### Fixed
15
+
16
+ - Fix throws an exception 'IHDR not in place for PNG' during parse ipa file.
17
+
18
+ ### Changed
19
+
20
+ - Temporary remove `dimensions` key from icons method (Only ipa file)
21
+
22
+ ## [2.4.2] (2021-04-06)
23
+
24
+ ### Changed
25
+
26
+ - Remove [pngdefry](https://github.com/soffes/pngdefry) gem, install it to decode iOS png file if needs.
27
+
28
+ ## [2.4.1] (2021-03-08)
29
+
30
+ ### Changed
31
+
32
+ - Rename `cleanup!` to `clear!` method in ipa.
33
+
34
+ ### Added
35
+
36
+ - Add `clear!` method to ipa,apk, dsym and proguard.
37
+ - Make `contents` to be a public method.
38
+
39
+ ## [2.3.0] (2021-01-15)
40
+
41
+ ### Changed
42
+
43
+ - Change `IPA::ExportType::INHOUSE` to `IPA::ExportType::ENTERPRISE` and change the value. #[24](https://github.com/icyleaf/app-info/pull/24)
44
+ ### Added
45
+
46
+ - Add `plugins`, `frameworks` to `AppInfo::IPA`. #[25](https://github.com/icyleaf/app-info/pull/25)
47
+
48
+ ## [2.2.0] (2020-07-21)
49
+
50
+ ### Added
51
+
52
+ - Add `platforms`, `platform` and `type` to `AppInfo::MobileProvision`.
53
+ - Add Enabled Capabilities support for mobileprovision. #[21](https://github.com/icyleaf/app-info/pull/19)
54
+
12
55
  ## [2.1.4] (2020-01-21)
13
56
 
14
57
  ### Fixed
@@ -75,7 +118,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
75
118
 
76
119
  - Updated dependency of CFPropertly list be a range between 2.3.4. (thanks @[cschroed](https://github.com/cschroed))
77
120
 
78
- [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.1.4..HEAD
121
+ [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.4.3..HEAD
122
+ [2.4.3]: https://github.com/icyleaf/app-info/compare/v2.4.2...v2.4.3
123
+ [2.4.2]: https://github.com/icyleaf/app-info/compare/v2.4.1...v2.4.2
124
+ [2.4.1]: https://github.com/icyleaf/app-info/compare/v2.3.0...v2.4.1
125
+ [2.3.0]: https://github.com/icyleaf/app-info/compare/v2.2.0...v2.3.0
126
+ [2.2.0]: https://github.com/icyleaf/app-info/compare/v2.1.4...v2.2.0
79
127
  [2.1.4]: https://github.com/icyleaf/app-info/compare/v2.1.3...v2.1.4
80
128
  [2.1.3]: https://github.com/icyleaf/app-info/compare/v2.1.2...v2.1.3
81
129
  [2.1.2]: https://github.com/icyleaf/app-info/compare/v2.1.1...v2.1.2
data/Gemfile CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  source 'https://rubygems.org'
4
- # source 'https://gems.ruby-china.com'
5
4
 
6
5
  # Specify your gem's dependencies in app-info.gemspec
7
6
  gemspec
data/README.md CHANGED
@@ -12,7 +12,7 @@ Teardown tool for mobile app(ipa/apk) and dSYM.zip file, analysis metedata like
12
12
  - Android apk file
13
13
  - iOS ipa file
14
14
  - Info.plist file
15
- - .mobileprovision file
15
+ - .mobileprovision/.provisionprofile file
16
16
  - dSYM(.zip) file
17
17
 
18
18
  ## Installation
@@ -51,7 +51,7 @@ parser = AppInfo.parse('App.dSYm.zip')
51
51
 
52
52
  # If detect file type failed, you can parse in other way
53
53
  parser = AppInfo::IPA.new('iphone.ipa')
54
- parser = AppInfo::IPA.new('android.apk')
54
+ parser = AppInfo::APK.new('android.apk')
55
55
  parser = AppInfo::InfoPlist.new('App/Info.plist')
56
56
  parser = AppInfo::MobileProvision.new('provisioning_profile/uuid.mobileprovision')
57
57
  parser = AppInfo::DSYM.new('App.dSYm.zip')
@@ -82,7 +82,7 @@ ipa.bundle_id
82
82
 
83
83
  # get app icons
84
84
  ipa.icons
85
- # => [{:name=>"AppIcon29x29@2x~ipad.png", :file=>"/var/folders/mb/8cm0fz4d499968yss9y1j8bc0000gp/T/d20160728-69669-1xnub30/AppInfo-ios-a5369339399e62046d7d59c52254dac6/Payload/bundle.app/AppIcon29x29@2x~ipad.png", :dimensions=>[58, 58]}, ...]
85
+ # => [{:name=>"AppIcon29x29@2x~ipad.png", :file=>"/var/folders/mb/8cm0fz4d499968yss9y1j8bc0000gp/T/d20160728-69669-1xnub30/AppInfo-ios-a5369339399e62046d7d59c52254dac6/Payload/bundle.app/AppIcon29x29@2x~ipad.png"}, ...]
86
86
 
87
87
  # get provisioning profile devices
88
88
  ipa.devices
@@ -101,6 +101,14 @@ ipa.release_type
101
101
  ipa.archs
102
102
  # => [:armv7, :arm64]
103
103
 
104
+ # get built-in frameworks
105
+ ipa.frameworks
106
+ # => [<AppInfo::Framework:520 @name=Masonry.framework>, <AppInfo::Framework:520 @name=libswiftPhotos.dylib>]
107
+
108
+ # get built-in plugins
109
+ ipa.plugins
110
+ # => [<AppInfo::Plugin:1680 @name=NotificationService>]
111
+
104
112
  # get more propety in Info.plist
105
113
  ipa.info[:CFBundleDisplayName]
106
114
  # => 'AppInfoDemo'
@@ -127,6 +135,14 @@ profile.team_name
127
135
  # get UDID of devices
128
136
  profile.devices
129
137
  # => ['18cf53cddee60c5af9c97b1521e7cbf8342628da']
138
+
139
+ # detect type
140
+ profile.type
141
+ # => :development/:adhoc/:appstore/:enterprise
142
+
143
+ # get enabled capabilities
144
+ profile.enabled_capabilities
145
+ # => ['Apple Pay', 'iCloud', 'Sign In with Apple', ...]
130
146
  ```
131
147
 
132
148
  ### dSYM
@@ -223,6 +239,11 @@ apk.tv?
223
239
  apk.wear?
224
240
  ```
225
241
 
242
+ ## Best Practice
243
+
244
+ - [fastlane-plugin-app_info](https://github.com/icyleaf/fastlane-plugin-app_info): fastlane plugin
245
+ - [zealot](https://github.com/tryzealot/zealot/): Over The Air Server for deployment of Android and iOS apps
246
+
226
247
  ## Development
227
248
 
228
249
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -231,7 +252,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
231
252
 
232
253
  ## Contributing
233
254
 
234
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/app-info. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
255
+ Bug reports and pull requests are welcome on GitHub at https://github.com/icyleaf/app-info. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
235
256
 
236
257
  ## License
237
258
 
data/app_info.gemspec CHANGED
@@ -20,12 +20,11 @@ Gem::Specification.new do |spec|
20
20
  spec.required_ruby_version = '>= 2.3'
21
21
 
22
22
  spec.add_dependency 'CFPropertyList', ['< 3.1.0', '>= 2.3.4']
23
- spec.add_dependency 'image_size', '>= 1.5', '< 2.1'
24
- spec.add_dependency 'pngdefry', '~> 0.1.2'
23
+ spec.add_dependency 'image_size', '>= 1.5', '< 2.2'
25
24
  spec.add_dependency 'ruby-macho', '~> 2.2.0'
26
25
  spec.add_dependency 'ruby_android', '~> 0.7.7'
27
26
  spec.add_dependency 'rubyzip', '>= 1.2', '< 3.0'
28
- spec.add_dependency 'uuidtools', '~> 2.1.5'
27
+ spec.add_dependency 'uuidtools', '>= 2.1.5', '< 2.3.0'
29
28
 
30
29
  spec.add_development_dependency 'bundler', '>= 1.12'
31
30
  spec.add_development_dependency 'rake', '>= 10.0'
data/lib/app_info.rb CHANGED
@@ -5,6 +5,8 @@ require 'app_info/version'
5
5
  require 'app_info/ipa'
6
6
  require 'app_info/ipa/info_plist'
7
7
  require 'app_info/ipa/mobile_provision'
8
+ require 'app_info/ipa/plugin'
9
+ require 'app_info/ipa/framework'
8
10
  require 'app_info/apk'
9
11
  require 'app_info/dsym'
10
12
  require 'app_info/proguard'
data/lib/app_info/apk.rb CHANGED
@@ -10,7 +10,7 @@ module AppInfo
10
10
  class APK
11
11
  extend Forwardable
12
12
 
13
- attr_reader :file, :apk
13
+ attr_reader :file
14
14
 
15
15
  # APK Devices
16
16
  module Device
@@ -22,9 +22,6 @@ module AppInfo
22
22
 
23
23
  def initialize(file)
24
24
  @file = file
25
-
26
- Zip.warn_invalid_date = false # fix invaild date format warnings
27
- @apk = ::Android::Apk.new(file)
28
25
  end
29
26
 
30
27
  def size(humanable = false)
@@ -36,7 +33,7 @@ module AppInfo
36
33
  end
37
34
  alias file_type os
38
35
 
39
- def_delegators :@apk, :manifest, :resource, :dex
36
+ def_delegators :apk, :manifest, :resource, :dex
40
37
 
41
38
  def_delegators :manifest, :version_name, :package_name,
42
39
  :use_permissions, :components
@@ -93,13 +90,13 @@ module AppInfo
93
90
  end
94
91
 
95
92
  def signs
96
- @apk.signs.each_with_object([]) do |(path, sign), obj|
93
+ apk.signs.each_with_object([]) do |(path, sign), obj|
97
94
  obj << Sign.new(path, sign)
98
95
  end
99
96
  end
100
97
 
101
98
  def certificates
102
- @apk.certificates.each_with_object([]) do |(path, certificate), obj|
99
+ apk.certificates.each_with_object([]) do |(path, certificate), obj|
103
100
  obj << Certificate.new(path, certificate)
104
101
  end
105
102
  end
@@ -112,13 +109,17 @@ module AppInfo
112
109
  components.select { |c| c.type == 'service' }
113
110
  end
114
111
 
112
+ def apk
113
+ Zip.warn_invalid_date = false # fix invaild date format warnings
114
+
115
+ @apk ||= ::Android::Apk.new(@file)
116
+ end
117
+
115
118
  def icons
116
119
  unless @icons
117
- tmp_path = File.join(Dir.mktmpdir, "AppInfo-android-#{SecureRandom.hex}")
118
-
119
- @icons = @apk.icon.each_with_object([]) do |(path, data), obj|
120
+ @icons = apk.icon.each_with_object([]) do |(path, data), obj|
120
121
  icon_name = File.basename(path)
121
- icon_path = File.join(tmp_path, File.dirname(path))
122
+ icon_path = File.join(contents, File.dirname(path))
122
123
  icon_file = File.join(icon_path, icon_name)
123
124
  FileUtils.mkdir_p icon_path
124
125
  File.open(icon_file, 'wb') { |f| f.write(data) }
@@ -134,6 +135,22 @@ module AppInfo
134
135
  @icons
135
136
  end
136
137
 
138
+ def clear!
139
+ return unless @contents
140
+
141
+ FileUtils.rm_rf(@contents)
142
+
143
+ @apk = nil
144
+ @contents = nil
145
+ @icons = nil
146
+ @app_path = nil
147
+ @info = nil
148
+ end
149
+
150
+ def contents
151
+ @contents ||= File.join(Dir.mktmpdir, "AppInfo-android-#{SecureRandom.hex}")
152
+ end
153
+
137
154
  private
138
155
 
139
156
  def manifest_values(path, key = 'name')
data/lib/app_info/dsym.rb CHANGED
@@ -74,7 +74,17 @@ module AppInfo
74
74
  @app_path
75
75
  end
76
76
 
77
- private
77
+ def clear!
78
+ return unless @contents
79
+
80
+ FileUtils.rm_rf(@contents)
81
+
82
+ @contents = nil
83
+ @app_path = nil
84
+ @info = nil
85
+ @object = nil
86
+ @macho_type = nil
87
+ end
78
88
 
79
89
  def contents
80
90
  unless @contents
data/lib/app_info/ipa.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'macho'
4
- require 'pngdefry'
5
4
  require 'fileutils'
6
5
  require 'forwardable'
7
6
  require 'cfpropertylist'
@@ -18,9 +17,11 @@ module AppInfo
18
17
  module ExportType
19
18
  DEBUG = 'Debug'
20
19
  ADHOC = 'AdHoc'
21
- INHOUSE = 'inHouse'
20
+ ENTERPRISE = 'Enterprise'
22
21
  RELEASE = 'Release'
23
22
  UNKOWN = nil
23
+
24
+ INHOUSE = 'Enterprise' # Rename and Alias to enterprise
24
25
  end
25
26
 
26
27
  def initialize(file)
@@ -60,7 +61,7 @@ module AppInfo
60
61
  if devices
61
62
  ExportType::ADHOC
62
63
  else
63
- ExportType::INHOUSE
64
+ ExportType::ENTERPRISE
64
65
  end
65
66
  else
66
67
  ExportType::DEBUG
@@ -86,6 +87,14 @@ module AppInfo
86
87
  metadata? ? true : false
87
88
  end
88
89
 
90
+ def plugins
91
+ @plugins ||= Plugin.parse(app_path)
92
+ end
93
+
94
+ def frameworks
95
+ @frameworks ||= Framework.parse(app_path)
96
+ end
97
+
89
98
  def hide_developer_certificates
90
99
  mobileprovision.delete('DeveloperCertificates') if mobileprovision?
91
100
  end
@@ -137,7 +146,7 @@ module AppInfo
137
146
  @app_path ||= Dir.glob(File.join(contents, 'Payload', '*.app')).first
138
147
  end
139
148
 
140
- def cleanup!
149
+ def clear!
141
150
  return unless @contents
142
151
 
143
152
  FileUtils.rm_rf(@contents)
@@ -150,12 +159,12 @@ module AppInfo
150
159
  @info = nil
151
160
  end
152
161
 
153
- private
154
-
155
162
  def contents
156
163
  @contents ||= Util.unarchive(@file, path: 'ios')
157
164
  end
158
165
 
166
+ private
167
+
159
168
  def icons_root_path
160
169
  iphone = 'CFBundleIcons'
161
170
  ipad = 'CFBundleIcons~ipad'
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'forwardable'
4
+
5
+ module AppInfo
6
+ # iOS Plugin parser
7
+ class Framework
8
+ extend Forwardable
9
+
10
+ def self.parse(path, name = 'Frameworks')
11
+ files = Dir.glob(File.join(path, name.to_s, '*'))
12
+ return [] if files.empty?
13
+
14
+ files.each_with_object([]) do |file, obj|
15
+ obj << new(file)
16
+ end
17
+ end
18
+
19
+ attr_reader :file
20
+
21
+ def_delegators :info, :display_name, :bundle_name, :release_version, :build_version,
22
+ :identifier, :bundle_id, :min_sdk_version, :device_type
23
+
24
+ def initialize(file)
25
+ @file = file
26
+ end
27
+
28
+ def name
29
+ File.basename(file)
30
+ end
31
+
32
+ def macho
33
+ return unless lib?
34
+
35
+ require 'macho'
36
+ MachO.open(file)
37
+ end
38
+
39
+ def lib?
40
+ File.file?(file)
41
+ end
42
+
43
+ def info
44
+ @info ||= InfoPlist.new(file)
45
+ end
46
+
47
+ def to_s
48
+ "<#{self.class}:#{object_id} @name=#{name}>"
49
+ end
50
+ end
51
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'image_size'
3
4
  require 'cfpropertylist'
4
5
  require 'app_info/util'
5
6
 
@@ -57,8 +58,7 @@ module AppInfo
57
58
  Dir.glob(File.join(@app_path, "#{items}*")).find_all.each do |file|
58
59
  dict = {
59
60
  name: File.basename(file),
60
- file: file,
61
- dimensions: Pngdefry.dimensions(file)
61
+ file: file
62
62
  }
63
63
 
64
64
  @icons.push(dict)
@@ -122,6 +122,8 @@ module AppInfo
122
122
  private
123
123
 
124
124
  def info
125
+ return unless File.file?(info_path)
126
+
125
127
  @info ||= CFPropertyList.native_types(CFPropertyList::List.new(file: info_path).value)
126
128
  end
127
129
 
@@ -19,6 +19,26 @@ module AppInfo
19
19
  mobileprovision.try(:[], 'AppIDName')
20
20
  end
21
21
 
22
+ def type
23
+ return :development if development?
24
+ return :adhoc if adhoc?
25
+ return :appstore if appstore?
26
+ return :enterprise if enterprise?
27
+ end
28
+
29
+ def platforms
30
+ return unless platforms = mobileprovision.try(:[], 'Platform')
31
+
32
+ platforms.map { |v|
33
+ v = 'macOS' if v == 'OSX'
34
+ v.downcase.to_sym
35
+ }
36
+ end
37
+
38
+ def platform
39
+ platforms[0]
40
+ end
41
+
22
42
  def devices
23
43
  mobileprovision.try(:[], 'ProvisionedDevices')
24
44
  end
@@ -56,6 +76,123 @@ module AppInfo
56
76
  end
57
77
  end
58
78
 
79
+ # Detect is development type of mobileprovision
80
+ #
81
+ # related link: https://stackoverflow.com/questions/1003066/what-does-get-task-allow-do-in-xcode
82
+ def development?
83
+ case platform.downcase.to_sym
84
+ when :ios
85
+ entitlements['get-task-allow'] == true
86
+ when :macos
87
+ !devices.nil?
88
+ else
89
+ raise Error, "Not implement with platform: #{platform}"
90
+ end
91
+ end
92
+
93
+ # Detect app store type
94
+ #
95
+ # related link: https://developer.apple.com/library/archive/qa/qa1830/_index.html
96
+ def appstore?
97
+ case platform.downcase.to_sym
98
+ when :ios
99
+ !development? && entitlements.key?('beta-reports-active')
100
+ when :macos
101
+ !development?
102
+ else
103
+ raise Error, "Not implement with platform: #{platform}"
104
+ end
105
+ end
106
+
107
+ def adhoc?
108
+ return false if platform == :macos # macOS no need adhoc
109
+
110
+ !development? && !devices.nil?
111
+ end
112
+
113
+ def enterprise?
114
+ return false if platform == :macos # macOS no need adhoc
115
+
116
+ !development? && !adhoc? && !appstore?
117
+ end
118
+ alias inhouse? enterprise?
119
+
120
+ # Enabled Capabilites
121
+ #
122
+ # Related link: https://developer.apple.com/support/app-capabilities/
123
+ def enabled_capabilities
124
+ capabilities = []
125
+ if adhoc? || appstore?
126
+ capabilities << 'In-App Purchase' << 'GameKit'
127
+ end
128
+
129
+ entitlements.each do |key, value|
130
+ case key
131
+ when 'aps-environment'
132
+ capabilities << 'Push Notifications'
133
+ when 'com.apple.developer.applesignin'
134
+ capabilities << 'Sign In with Apple'
135
+ when 'com.apple.developer.siri'
136
+ capabilities << 'SiriKit'
137
+ when 'com.apple.security.application-groups'
138
+ capabilities << 'App Groups'
139
+ when 'com.apple.developer.associated-domains'
140
+ capabilities << 'Associated Domains'
141
+ when 'com.apple.developer.default-data-protection'
142
+ capabilities << 'Data Protection'
143
+ when 'com.apple.developer.networking.networkextension'
144
+ capabilities << 'Network Extensions'
145
+ when 'com.apple.developer.networking.vpn.api'
146
+ capabilities << 'Personal VPN'
147
+ when 'com.apple.developer.healthkit', 'com.apple.developer.healthkit.access'
148
+ capabilities << 'HealthKit' unless capabilities.include?('HealthKit')
149
+ when 'com.apple.developer.icloud-services', 'com.apple.developer.icloud-container-identifiers'
150
+ capabilities << 'iCloud' unless capabilities.include?('iCloud')
151
+ when 'com.apple.developer.in-app-payments'
152
+ capabilities << 'Apple Pay'
153
+ when 'com.apple.developer.homekit'
154
+ capabilities << 'HomeKit'
155
+ when 'com.apple.developer.user-fonts'
156
+ capabilities << 'Fonts'
157
+ when 'com.apple.developer.pass-type-identifiers'
158
+ capabilities << 'Wallet'
159
+ when 'inter-app-audio'
160
+ capabilities << 'Inter-App Audio'
161
+ when 'com.apple.developer.networking.multipath'
162
+ capabilities << 'Multipath'
163
+ when 'com.apple.developer.authentication-services.autofill-credential-provider'
164
+ capabilities << 'AutoFill Credential Provider'
165
+ when 'com.apple.developer.networking.wifi-info'
166
+ capabilities << 'Access WiFi Information'
167
+ when 'com.apple.external-accessory.wireless-configuration'
168
+ capabilities << 'Wireless Accessory Configuration'
169
+ when 'com.apple.developer.kernel.extended-virtual-addressing'
170
+ capabilities << 'Extended Virtual Address Space'
171
+ when 'com.apple.developer.nfc.readersession.formats'
172
+ capabilities << 'NFC Tag Reading'
173
+ when 'com.apple.developer.ClassKit-environment'
174
+ capabilities << 'ClassKit'
175
+ when 'com.apple.developer.networking.HotspotConfiguration'
176
+ capabilities << 'Hotspot'
177
+ when 'com.apple.developer.devicecheck.appattest-environment'
178
+ capabilities << 'App Attest'
179
+ when 'com.apple.developer.coremedia.hls.low-latency'
180
+ capabilities << 'Low Latency HLS'
181
+ when 'com.apple.developer.associated-domains.mdm-managed'
182
+ capabilities << 'MDM Managed Associated Domains'
183
+ # macOS Only
184
+ when 'com.apple.developer.maps'
185
+ capabilities << 'Maps'
186
+ when 'com.apple.developer.system-extension.install'
187
+ capabilities << 'System Extension'
188
+ when 'com.apple.developer.networking.custom-protocol'
189
+ capabilities << 'Custom Network Protocol'
190
+ end
191
+ end
192
+
193
+ capabilities
194
+ end
195
+
59
196
  def [](key)
60
197
  mobileprovision.try(:[], key.to_s)
61
198
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'app_info/ipa/framework'
4
+
5
+ module AppInfo
6
+ # iOS Plugin parser
7
+ class Plugin < Framework
8
+ extend Forwardable
9
+
10
+ def self.parse(path, name = 'PlugIns')
11
+ super
12
+ end
13
+
14
+ def_delegators :info, :name
15
+ end
16
+ end
@@ -86,5 +86,18 @@ module AppInfo
86
86
  def contents
87
87
  @contents ||= Util.unarchive(@file, path: 'proguard')
88
88
  end
89
+
90
+ def clear!
91
+ return unless @contents
92
+
93
+ FileUtils.rm_rf(@contents)
94
+
95
+ @contents = nil
96
+ @manifest = nil
97
+ @mapping_path = nil
98
+ @metadata_path = nil
99
+ @manifest_path = nil
100
+ @symbol_path = nil
101
+ end
89
102
  end
90
103
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppInfo
4
- VERSION = '2.1.4'
4
+ VERSION = '2.4.3'
5
5
  end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app-info
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - icyleaf
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-21 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 2.3.4
20
17
  - - "<"
21
18
  - !ruby/object:Gem::Version
22
19
  version: 3.1.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.3.4
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 2.3.4
30
27
  - - "<"
31
28
  - !ruby/object:Gem::Version
32
29
  version: 3.1.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.3.4
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: image_size
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '1.5'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '2.1'
42
+ version: '2.2'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,21 +49,7 @@ dependencies:
49
49
  version: '1.5'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '2.1'
53
- - !ruby/object:Gem::Dependency
54
- name: pngdefry
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: 0.1.2
60
- type: :runtime
61
- prerelease: false
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "~>"
65
- - !ruby/object:Gem::Version
66
- version: 0.1.2
52
+ version: '2.2'
67
53
  - !ruby/object:Gem::Dependency
68
54
  name: ruby-macho
69
55
  requirement: !ruby/object:Gem::Requirement
@@ -116,16 +102,22 @@ dependencies:
116
102
  name: uuidtools
117
103
  requirement: !ruby/object:Gem::Requirement
118
104
  requirements:
119
- - - "~>"
105
+ - - ">="
120
106
  - !ruby/object:Gem::Version
121
107
  version: 2.1.5
108
+ - - "<"
109
+ - !ruby/object:Gem::Version
110
+ version: 2.3.0
122
111
  type: :runtime
123
112
  prerelease: false
124
113
  version_requirements: !ruby/object:Gem::Requirement
125
114
  requirements:
126
- - - "~>"
115
+ - - ">="
127
116
  - !ruby/object:Gem::Version
128
117
  version: 2.1.5
118
+ - - "<"
119
+ - !ruby/object:Gem::Version
120
+ version: 2.3.0
129
121
  - !ruby/object:Gem::Dependency
130
122
  name: bundler
131
123
  requirement: !ruby/object:Gem::Requirement
@@ -193,8 +185,10 @@ files:
193
185
  - lib/app_info/core_ext/object/try.rb
194
186
  - lib/app_info/dsym.rb
195
187
  - lib/app_info/ipa.rb
188
+ - lib/app_info/ipa/framework.rb
196
189
  - lib/app_info/ipa/info_plist.rb
197
190
  - lib/app_info/ipa/mobile_provision.rb
191
+ - lib/app_info/ipa/plugin.rb
198
192
  - lib/app_info/proguard.rb
199
193
  - lib/app_info/util.rb
200
194
  - lib/app_info/version.rb
@@ -202,7 +196,7 @@ homepage: http://github.com/icyleaf/app-info
202
196
  licenses:
203
197
  - MIT
204
198
  metadata: {}
205
- post_install_message:
199
+ post_install_message:
206
200
  rdoc_options: []
207
201
  require_paths:
208
202
  - lib
@@ -217,8 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
211
  - !ruby/object:Gem::Version
218
212
  version: '0'
219
213
  requirements: []
220
- rubygems_version: 3.0.6
221
- signing_key:
214
+ rubygems_version: 3.1.4
215
+ signing_key:
222
216
  specification_version: 4
223
217
  summary: Teardown tool for mobile app(ipa/apk) and dSYM file, analysis metedata like
224
218
  version, name, icon