cocoapods-bb-PodAssistant 0.3.17.0 → 0.3.17.2

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: 15e433b2c397312291b454148d05e1d2117d5ae31097c527076545c5fd9debc1
4
- data.tar.gz: 1d205ed8dab8a31aa48627543a0a15cfa5b2f3dd84965179f3c204d4539d1316
3
+ metadata.gz: 5dc3a167c46aebca4053c656bf90ab1583182cf2d120f4877442e8c9e44bf9c0
4
+ data.tar.gz: 50332b1a9c0e7ebaa3634b8f5355a353091c863c4c3bb652bc412478c9da3284
5
5
  SHA512:
6
- metadata.gz: 4a84e7bddcc1ad0776fad2e18c6f39d37688958cefd571928e222e92af46d11f5506bc0125bc0820bc5df6c80d6318bcab58b5b9e09bacca4892da94cde6fd15
7
- data.tar.gz: 18fc72226f51be2069409fb69db04a3ed33a495a2bb44879261003b94b4fcd4c09be082d9b22df53db590be8ce72a2a271d4169ef7c56cceceb988bc7d63e952
6
+ metadata.gz: e31a92dd92639b6b7674b9c7f1adf3a4bc01518161f01ced86a63f9447a2d2f4dda99dd5a6635bca0bafe1bdf8ff1c1594607a27b1e0808a28ce0aa130e6093d
7
+ data.tar.gz: 80a38dc647a86891d0326e569d48ce345e7337edd14165f83bd57fee25f02177936b79f6284d5386348b00391b4b93d253fcacb1a502a28e42e30e6cf167551c
data/bin/omvllctl ADDED
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env ruby
2
+ require 'gli'
3
+ require 'cocoapods-bb-PodAssistant'
4
+
5
+ include GLI::App
6
+
7
+ program_desc 'iOS加固命令行工具, 为iOS开发者提供的工具集合'
8
+ version CocoapodsBbPodassistant::VERSION
9
+
10
+ # Environment management is delegated to the shared shell backend.
11
+ # Set OMVLL_SCRIPT_DIR to the directory containing the management scripts.
12
+ def execute_backend(name, args)
13
+ script_dir = ENV.fetch('OMVLL_SCRIPT_DIR', File.join(Dir.home, 'omvll', 'scripts'))
14
+ script_dir = script_dir.sub(/\A(?:\$HOME|\$\{HOME\})(?=\/|\z)/) { Dir.home }
15
+ script_dir = File.expand_path(script_dir)
16
+ script = File.join(script_dir, "#{name}.sh")
17
+ unless File.file?(script) && File.readable?(script)
18
+ abort "O-MVLL backend script not found: #{script}"
19
+ end
20
+
21
+ success = system('/bin/bash', script, *args)
22
+ exit($?.exitstatus || 1) unless success
23
+ end
24
+
25
+ desc '安装指定版本的工具链'
26
+ arg_name '[version]'
27
+ command :install do |c|
28
+ c.action do |global_options, options, args|
29
+ execute_backend('install', args)
30
+ end
31
+ end
32
+
33
+ desc '检查工具链环境及编译兼容性'
34
+ command :check do |c|
35
+ c.action do |global_options, options, args|
36
+ execute_backend('check', args)
37
+ end
38
+ end
39
+
40
+ desc '解析当前 Xcode 对应的工具链'
41
+ arg_name '[version]'
42
+ command :resolve do |c|
43
+ c.action do |global_options, options, args|
44
+ execute_backend('resolve', args)
45
+ end
46
+ end
47
+
48
+ desc '准备本次构建环境并生成环境描述文件'
49
+ arg_name '[version]'
50
+ command :prepare do |c|
51
+ c.action do |global_options, options, args|
52
+ execute_backend('prepare', args)
53
+ end
54
+ end
55
+
56
+ desc '查看当前工具链版本'
57
+ command :version do |c|
58
+ c.action do |global_options, options, args|
59
+ execute_backend('version', args)
60
+ end
61
+ end
62
+
63
+ desc '列出已安装的工具链版本'
64
+ command :list do |c|
65
+ c.action do |global_options, options, args|
66
+ execute_backend('list', args)
67
+ end
68
+ end
69
+
70
+ desc '更新工具链'
71
+ arg_name '[version]'
72
+ command :update do |c|
73
+ c.action do |global_options, options, args|
74
+ execute_backend('update', args)
75
+ end
76
+ end
77
+
78
+ desc '回滚到指定工具链版本'
79
+ arg_name 'version'
80
+ command :rollback do |c|
81
+ c.action do |global_options, options, args|
82
+ abort 'Usage: omvllctl rollback <version>' unless args.length == 1
83
+ execute_backend('rollback', args)
84
+ end
85
+ end
86
+
87
+ desc '卸载指定工具链版本'
88
+ arg_name 'version'
89
+ command :uninstall do |c|
90
+ c.action do |global_options, options, args|
91
+ abort 'Usage: omvllctl uninstall <version>' unless args.length == 1
92
+ execute_backend('uninstall', args)
93
+ end
94
+ end
95
+
96
+ exit run(ARGV)
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBbPodassistant
2
- VERSION = "0.3.17.0"
2
+ VERSION = "0.3.17.2"
3
3
  end
@@ -5,7 +5,6 @@ require 'cocoapods-bb-PodAssistant/helpers/pod_utils'
5
5
  module SecurityHardening
6
6
  # 经过安全评估和兼容性验证的自研组件名称
7
7
  DEFAULT_OMVLL_WHITELIST = [
8
- 'Masonry',
9
8
  'BBGameModule',
10
9
  'BBAppGlobalComponent',
11
10
  'BBSVideoPlayer',
@@ -36,6 +35,10 @@ module SecurityHardening
36
35
  'GYDataCenter',
37
36
  'SDWebImageSVGAPlugin',
38
37
  'SVGAPlayer',
38
+ 'Masonry',
39
+ 'BBDLNAKit',
40
+ 'BBAudioRecorder',
41
+ 'BBAccountModule',
39
42
  ].freeze
40
43
 
41
44
  module_function
@@ -45,14 +48,22 @@ module SecurityHardening
45
48
  DEFAULT_OMVLL_WHITELIST + Array(omvll_whitelist)
46
49
  ).uniq
47
50
  puts "omvll加固白名单 #{omvll_whitelist}"
48
- app_apply_security_hardening(installer, enable_omvll)
49
51
  pod_apply_security_hardening(installer, enable_omvll, omvll_whitelist)
52
+ app_apply_security_hardening(installer, enable_omvll)
50
53
  end
51
54
 
52
55
  private def resolve_omvll_plugin_flag
53
- omvll_plugin = ENV.fetch('OMVLL_SCRIPT_DIR', File.join(Dir.home, 'omvll', 'current', 'omvll-xcode.dylib'))
54
- raise "[O-MVLL] 插件不存在: #{omvll_plugin}(先运行:% omvllctl install)" unless File.exist?(omvll_plugin)
55
- "-fpass-plugin=#{omvll_plugin}"
56
+ # omvll_plugin = ENV.fetch('OMVLL_SCRIPT_DIR', File.join(Dir.home, 'omvll', 'current', 'omvll-xcode.dylib'))
57
+ # raise "[O-MVLL] 插件不存在: #{omvll_plugin}(先运行:% omvllctl install)" unless File.exist?(omvll_plugin)
58
+ # "-fpass-plugin=#{omvll_plugin}"
59
+ relative_path = 'omvll/current/omvll-xcode.dylib'
60
+ # 使用真实绝对路径校验本地插件是否存在
61
+ plugin_path = File.join(Dir.home, relative_path)
62
+ unless File.file?(plugin_path)
63
+ raise "[O-MVLL] 插件不存在: #{plugin_path}(先运行:omvllctl install)"
64
+ end
65
+ # 写入 Xcode Build Settings,编译时动态解析 HOME
66
+ "-fpass-plugin=$(HOME)/#{relative_path}"
56
67
  end
57
68
 
58
69
  # omvll混淆、xcode自带混淆
@@ -92,6 +103,10 @@ module SecurityHardening
92
103
  update_setting(config, omvll_flag, enable_omvll)
93
104
  end
94
105
  end
106
+ if enable_omvll == true
107
+ project.save
108
+ puts "[O-MVLL][App] 工程保存成功: #{project.path}"
109
+ end
95
110
  end
96
111
 
97
112
  # pods配置原生加固
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-PodAssistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.17.0
4
+ version: 0.3.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
@@ -142,6 +142,7 @@ executables:
142
142
  - bb_tools
143
143
  - match_decrypt
144
144
  - match_encrypt
145
+ - omvllctl
145
146
  extensions: []
146
147
  extra_rdoc_files: []
147
148
  files:
@@ -150,6 +151,7 @@ files:
150
151
  - bin/bb_tools
151
152
  - bin/match_decrypt
152
153
  - bin/match_encrypt
154
+ - bin/omvllctl
153
155
  - lib/cocoapods-bb-PodAssistant.rb
154
156
  - lib/cocoapods-bb-PodAssistant/babybus/bbsadvert/podfile_dependency_cache.rb
155
157
  - lib/cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment.rb