app-info 2.1.4 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec1ec092bf819b2a33bd95eabd72656e5220ae993bd28855d9b7ec11116f3470
4
- data.tar.gz: ff26401d6b6332d064479244f032539266b17fe2a490db1860a9847767d8f631
3
+ metadata.gz: 6f04c7ea1c72a434282e71c78eeebf12540e4489f67ccd2f97f3fbfcbe8208a4
4
+ data.tar.gz: 7411ca3c3cef8e572e4b9696ba38f1080959059cdd23f200100a2b229c327ed1
5
5
  SHA512:
6
- metadata.gz: 1c643af0daecb633dd2d1b2cfd6977496316cef3ff595c699b9654349cfc39bb413e411a866255737040972b0b26dc81c04b7fbd5d9748a3313190d6d3b0b32c
7
- data.tar.gz: d54160c181fba55dc99fc58963da826d55d3a817f705da220170f154e88215314b22630983de96e6bef353ea14602bd147feabbe9b920b175aff9f50d91d1f56
6
+ metadata.gz: bb1215bb6160e01d7b7e02aa79d53092e39b7d32b128e3e938c791960bd87783aa4d37c817828e97ca625be536916f746506f6e4adb8a8e1a38697b9ad08f8f2
7
+ data.tar.gz: 25c5f9522ba9afc772c858854d7ac0f98b3b8df6010d578f9edef1f7ff9587e13174a07207028572fd59f53e9849ca411f52897ef27c7310c8982e653ec9e14a
@@ -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
@@ -9,6 +9,13 @@ 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.2.0] (2020-07-21)
13
+
14
+ ### Added
15
+
16
+ - Add `platforms`, `platform` and `type` to `AppInfo::MobileProvision`. #[21](https://github.com/icyleaf/app-info/pull/19)
17
+ - Add Enabled Capabilities support for mobileprovision. #[21](https://github.com/icyleaf/app-info/pull/19)
18
+
12
19
  ## [2.1.4] (2020-01-21)
13
20
 
14
21
  ### Fixed
@@ -75,7 +82,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
75
82
 
76
83
  - Updated dependency of CFPropertly list be a range between 2.3.4. (thanks @[cschroed](https://github.com/cschroed))
77
84
 
78
- [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.1.4..HEAD
85
+ [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.2.0..HEAD
86
+ [2.2.0]: https://github.com/icyleaf/app-info/compare/v2.1.3...v2.1.4
79
87
  [2.1.4]: https://github.com/icyleaf/app-info/compare/v2.1.3...v2.1.4
80
88
  [2.1.3]: https://github.com/icyleaf/app-info/compare/v2.1.2...v2.1.3
81
89
  [2.1.2]: https://github.com/icyleaf/app-info/compare/v2.1.1...v2.1.2
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
@@ -127,6 +127,14 @@ profile.team_name
127
127
  # get UDID of devices
128
128
  profile.devices
129
129
  # => ['18cf53cddee60c5af9c97b1521e7cbf8342628da']
130
+
131
+ # detect type
132
+ profile.type
133
+ # => :development/:adhoc/:appstore/:inhouse
134
+
135
+ # get enabled capabilities
136
+ profile.enabled_capabilities
137
+ # => ['Apple Pay', 'iCloud', 'Sign In with Apple', ...]
130
138
  ```
131
139
 
132
140
  ### dSYM
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency 'ruby-macho', '~> 2.2.0'
26
26
  spec.add_dependency 'ruby_android', '~> 0.7.7'
27
27
  spec.add_dependency 'rubyzip', '>= 1.2', '< 3.0'
28
- spec.add_dependency 'uuidtools', '~> 2.1.5'
28
+ spec.add_dependency 'uuidtools', '>= 2.1.5', '< 2.3.0'
29
29
 
30
30
  spec.add_development_dependency 'bundler', '>= 1.12'
31
31
  spec.add_development_dependency 'rake', '>= 10.0'
@@ -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 :inhouse if inhouse?
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,122 @@ 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 inhouse?
114
+ return false if platform == :macos # macOS no need adhoc
115
+
116
+ !development? && !adhoc? && !appstore?
117
+ end
118
+
119
+ # Enabled Capabilites
120
+ #
121
+ # Related link: https://developer.apple.com/support/app-capabilities/
122
+ def enabled_capabilities
123
+ capabilities = []
124
+ if adhoc? || appstore?
125
+ capabilities << 'In-App Purchase' << 'GameKit'
126
+ end
127
+
128
+ entitlements.each do |key, value|
129
+ case key
130
+ when 'aps-environment'
131
+ capabilities << 'Push Notifications'
132
+ when 'com.apple.developer.applesignin'
133
+ capabilities << 'Sign In with Apple'
134
+ when 'com.apple.developer.siri'
135
+ capabilities << 'SiriKit'
136
+ when 'com.apple.security.application-groups'
137
+ capabilities << 'App Groups'
138
+ when 'com.apple.developer.associated-domains'
139
+ capabilities << 'Associated Domains'
140
+ when 'com.apple.developer.default-data-protection'
141
+ capabilities << 'Data Protection'
142
+ when 'com.apple.developer.networking.networkextension'
143
+ capabilities << 'Network Extensions'
144
+ when 'com.apple.developer.networking.vpn.api'
145
+ capabilities << 'Personal VPN'
146
+ when 'com.apple.developer.healthkit', 'com.apple.developer.healthkit.access'
147
+ capabilities << 'HealthKit' unless capabilities.include?('HealthKit')
148
+ when 'com.apple.developer.icloud-services', 'com.apple.developer.icloud-container-identifiers'
149
+ capabilities << 'iCloud' unless capabilities.include?('iCloud')
150
+ when 'com.apple.developer.in-app-payments'
151
+ capabilities << 'Apple Pay'
152
+ when 'com.apple.developer.homekit'
153
+ capabilities << 'HomeKit'
154
+ when 'com.apple.developer.user-fonts'
155
+ capabilities << 'Fonts'
156
+ when 'com.apple.developer.pass-type-identifiers'
157
+ capabilities << 'Wallet'
158
+ when 'inter-app-audio'
159
+ capabilities << 'Inter-App Audio'
160
+ when 'com.apple.developer.networking.multipath'
161
+ capabilities << 'Multipath'
162
+ when 'com.apple.developer.authentication-services.autofill-credential-provider'
163
+ capabilities << 'AutoFill Credential Provider'
164
+ when 'com.apple.developer.networking.wifi-info'
165
+ capabilities << 'Access WiFi Information'
166
+ when 'com.apple.external-accessory.wireless-configuration'
167
+ capabilities << 'Wireless Accessory Configuration'
168
+ when 'com.apple.developer.kernel.extended-virtual-addressing'
169
+ capabilities << 'Extended Virtual Address Space'
170
+ when 'com.apple.developer.nfc.readersession.formats'
171
+ capabilities << 'NFC Tag Reading'
172
+ when 'com.apple.developer.ClassKit-environment'
173
+ capabilities << 'ClassKit'
174
+ when 'com.apple.developer.networking.HotspotConfiguration'
175
+ capabilities << 'Hotspot'
176
+ when 'com.apple.developer.devicecheck.appattest-environment'
177
+ capabilities << 'App Attest'
178
+ when 'com.apple.developer.coremedia.hls.low-latency'
179
+ capabilities << 'Low Latency HLS'
180
+ when 'com.apple.developer.associated-domains.mdm-managed'
181
+ capabilities << 'MDM Managed Associated Domains'
182
+ # macOS Only
183
+ when 'com.apple.developer.maps'
184
+ capabilities << 'Maps'
185
+ when 'com.apple.developer.system-extension.install'
186
+ capabilities << 'System Extension'
187
+ when 'com.apple.developer.networking.custom-protocol'
188
+ capabilities << 'Custom Network Protocol'
189
+ end
190
+ end
191
+
192
+ capabilities
193
+ end
194
+
59
195
  def [](key)
60
196
  mobileprovision.try(:[], key.to_s)
61
197
  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.2.0'
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.1.4
4
+ version: 2.2.0
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: 2020-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList
@@ -116,16 +116,22 @@ dependencies:
116
116
  name: uuidtools
117
117
  requirement: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - "~>"
119
+ - - ">="
120
120
  - !ruby/object:Gem::Version
121
121
  version: 2.1.5
122
+ - - "<"
123
+ - !ruby/object:Gem::Version
124
+ version: 2.3.0
122
125
  type: :runtime
123
126
  prerelease: false
124
127
  version_requirements: !ruby/object:Gem::Requirement
125
128
  requirements:
126
- - - "~>"
129
+ - - ">="
127
130
  - !ruby/object:Gem::Version
128
131
  version: 2.1.5
132
+ - - "<"
133
+ - !ruby/object:Gem::Version
134
+ version: 2.3.0
129
135
  - !ruby/object:Gem::Dependency
130
136
  name: bundler
131
137
  requirement: !ruby/object:Gem::Requirement
@@ -202,7 +208,7 @@ homepage: http://github.com/icyleaf/app-info
202
208
  licenses:
203
209
  - MIT
204
210
  metadata: {}
205
- post_install_message:
211
+ post_install_message:
206
212
  rdoc_options: []
207
213
  require_paths:
208
214
  - lib
@@ -217,8 +223,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
223
  - !ruby/object:Gem::Version
218
224
  version: '0'
219
225
  requirements: []
220
- rubygems_version: 3.0.6
221
- signing_key:
226
+ rubygems_version: 3.0.3
227
+ signing_key:
222
228
  specification_version: 4
223
229
  summary: Teardown tool for mobile app(ipa/apk) and dSYM file, analysis metedata like
224
230
  version, name, icon