app-info 2.2.0 → 2.3.0

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: 6f04c7ea1c72a434282e71c78eeebf12540e4489f67ccd2f97f3fbfcbe8208a4
4
- data.tar.gz: 7411ca3c3cef8e572e4b9696ba38f1080959059cdd23f200100a2b229c327ed1
3
+ metadata.gz: 7e60db88b8b1bc77db8a80623e1f5f52f47114e04f7941486ca8e21ee9ca19f2
4
+ data.tar.gz: 78c45e538580d4c1c48807b77f38f650a09f4d1610581efb1c423d870c14425f
5
5
  SHA512:
6
- metadata.gz: bb1215bb6160e01d7b7e02aa79d53092e39b7d32b128e3e938c791960bd87783aa4d37c817828e97ca625be536916f746506f6e4adb8a8e1a38697b9ad08f8f2
7
- data.tar.gz: 25c5f9522ba9afc772c858854d7ac0f98b3b8df6010d578f9edef1f7ff9587e13174a07207028572fd59f53e9849ca411f52897ef27c7310c8982e653ec9e14a
6
+ metadata.gz: bfba684fb8bcf015c46f5457b2f4ea1e3bcbaac670a921f2b748a208d1069efff449e22ffb373754622d55927e4f65554aaa5e33c3576dbd55eb3437d3084ee0
7
+ data.tar.gz: 470dedd66f3bbd04a328e36a125599ca53c0ba9cc7c6778dea6cf74d61f348661080a0f4b801b8b02557c7e842a68e1ecbc7c585f0271e15e5625566ac7a1763
@@ -9,11 +9,20 @@ 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.3.0] (2021-01-15)
13
+
14
+ ### Changed
15
+
16
+ - Change `IPA::ExportType::INHOUSE` to `IPA::ExportType::ENTERPRISE` and change the value. #[24](https://github.com/icyleaf/app-info/pull/24)
17
+ ### Added
18
+
19
+ - Add `plugins`, `frameworks` to `AppInfo::IPA`. #[25](https://github.com/icyleaf/app-info/pull/25)
20
+
12
21
  ## [2.2.0] (2020-07-21)
13
22
 
14
23
  ### Added
15
24
 
16
- - Add `platforms`, `platform` and `type` to `AppInfo::MobileProvision`. #[21](https://github.com/icyleaf/app-info/pull/19)
25
+ - Add `platforms`, `platform` and `type` to `AppInfo::MobileProvision`.
17
26
  - Add Enabled Capabilities support for mobileprovision. #[21](https://github.com/icyleaf/app-info/pull/19)
18
27
 
19
28
  ## [2.1.4] (2020-01-21)
@@ -82,8 +91,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
82
91
 
83
92
  - Updated dependency of CFPropertly list be a range between 2.3.4. (thanks @[cschroed](https://github.com/cschroed))
84
93
 
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
94
+ [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.3.0..HEAD
95
+ [2.2.0]: https://github.com/icyleaf/app-info/compare/v2.2.0...v2.3.0
96
+ [2.2.0]: https://github.com/icyleaf/app-info/compare/v2.1.4...v2.2.0
87
97
  [2.1.4]: https://github.com/icyleaf/app-info/compare/v2.1.3...v2.1.4
88
98
  [2.1.3]: https://github.com/icyleaf/app-info/compare/v2.1.2...v2.1.3
89
99
  [2.1.2]: https://github.com/icyleaf/app-info/compare/v2.1.1...v2.1.2
data/README.md CHANGED
@@ -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'
@@ -130,7 +138,7 @@ profile.devices
130
138
 
131
139
  # detect type
132
140
  profile.type
133
- # => :development/:adhoc/:appstore/:inhouse
141
+ # => :development/:adhoc/:appstore/:enterprise
134
142
 
135
143
  # get enabled capabilities
136
144
  profile.enabled_capabilities
@@ -20,7 +20,7 @@ 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'
23
+ spec.add_dependency 'image_size', '>= 1.5', '< 2.2'
24
24
  spec.add_dependency 'pngdefry', '~> 0.1.2'
25
25
  spec.add_dependency 'ruby-macho', '~> 2.2.0'
26
26
  spec.add_dependency 'ruby_android', '~> 0.7.7'
@@ -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'
@@ -18,9 +18,11 @@ module AppInfo
18
18
  module ExportType
19
19
  DEBUG = 'Debug'
20
20
  ADHOC = 'AdHoc'
21
- INHOUSE = 'inHouse'
21
+ ENTERPRISE = 'Enterprise'
22
22
  RELEASE = 'Release'
23
23
  UNKOWN = nil
24
+
25
+ INHOUSE = 'Enterprise' # Rename and Alias to enterprise
24
26
  end
25
27
 
26
28
  def initialize(file)
@@ -60,7 +62,7 @@ module AppInfo
60
62
  if devices
61
63
  ExportType::ADHOC
62
64
  else
63
- ExportType::INHOUSE
65
+ ExportType::ENTERPRISE
64
66
  end
65
67
  else
66
68
  ExportType::DEBUG
@@ -86,6 +88,14 @@ module AppInfo
86
88
  metadata? ? true : false
87
89
  end
88
90
 
91
+ def plugins
92
+ @plugins ||= Plugin.parse(app_path)
93
+ end
94
+
95
+ def frameworks
96
+ @frameworks ||= Framework.parse(app_path)
97
+ end
98
+
89
99
  def hide_developer_certificates
90
100
  mobileprovision.delete('DeveloperCertificates') if mobileprovision?
91
101
  end
@@ -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
@@ -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
 
@@ -23,7 +23,7 @@ module AppInfo
23
23
  return :development if development?
24
24
  return :adhoc if adhoc?
25
25
  return :appstore if appstore?
26
- return :inhouse if inhouse?
26
+ return :enterprise if enterprise?
27
27
  end
28
28
 
29
29
  def platforms
@@ -110,11 +110,12 @@ module AppInfo
110
110
  !development? && !devices.nil?
111
111
  end
112
112
 
113
- def inhouse?
113
+ def enterprise?
114
114
  return false if platform == :macos # macOS no need adhoc
115
115
 
116
116
  !development? && !adhoc? && !appstore?
117
117
  end
118
+ alias inhouse? enterprise?
118
119
 
119
120
  # Enabled Capabilites
120
121
  #
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppInfo
4
- VERSION = '2.2.0'
4
+ VERSION = '2.3.0'
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.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - icyleaf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-21 00:00:00.000000000 Z
11
+ date: 2021-01-19 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,7 +49,7 @@ dependencies:
49
49
  version: '1.5'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '2.1'
52
+ version: '2.2'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: pngdefry
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -199,8 +199,10 @@ files:
199
199
  - lib/app_info/core_ext/object/try.rb
200
200
  - lib/app_info/dsym.rb
201
201
  - lib/app_info/ipa.rb
202
+ - lib/app_info/ipa/framework.rb
202
203
  - lib/app_info/ipa/info_plist.rb
203
204
  - lib/app_info/ipa/mobile_provision.rb
205
+ - lib/app_info/ipa/plugin.rb
204
206
  - lib/app_info/proguard.rb
205
207
  - lib/app_info/util.rb
206
208
  - lib/app_info/version.rb
@@ -223,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
225
  - !ruby/object:Gem::Version
224
226
  version: '0'
225
227
  requirements: []
226
- rubygems_version: 3.0.3
228
+ rubygems_version: 3.1.4
227
229
  signing_key:
228
230
  specification_version: 4
229
231
  summary: Teardown tool for mobile app(ipa/apk) and dSYM file, analysis metedata like