pindo 4.7.2 → 4.7.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.
@@ -421,6 +421,8 @@ module Pindo
421
421
  # puts "appId #{appId}"
422
422
  version_data = @pgyer_client.get_app_version_list_req(appId:appId) || {}
423
423
 
424
+ Funlog.instance.fancyinfo_success("拉取app上传记录完成!")
425
+
424
426
  if version_data["data"].nil? || version_data["data"].size <=0
425
427
  raise Informative, "#{proj_name} 错误, 没有找到上传记录"
426
428
  end
@@ -447,7 +449,7 @@ module Pindo
447
449
 
448
450
  end
449
451
 
450
- Funlog.instance.fancyinfo_success("拉取app上传记录完成!")
452
+
451
453
 
452
454
  version_item_obj = nil
453
455
  if !app_incId_index.nil?
@@ -138,7 +138,9 @@ module Pindo
138
138
  project_fullname = Dir.glob(File.join(project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
139
139
  project_obj = Xcodeproj::Project.open(project_fullname)
140
140
  presources_group = find_group(group:project_obj.main_group, group_name:"PResources")
141
-
141
+ if presources_group.nil?
142
+ presources_group = find_group(group:project_obj.main_group, group_name:"PResource")
143
+ end
142
144
  if presources_group.nil?
143
145
  raise Informative, "没有找到资源目录PResources!!!!"
144
146
  end
@@ -7,13 +7,13 @@ require 'pindo/module/cert/xcodecerthelper'
7
7
  module Pindo
8
8
 
9
9
  module XcodeBuildHelper
10
-
10
+
11
11
  def pull_podfile_lock(project_dir:nil, app_config_dir:nil)
12
12
  begin
13
13
  src_pod_file = File.join(app_config_dir, "Podfile.lock")
14
14
  build_verify_file = File.join(app_config_dir, "build_verify.json")
15
15
  build_verify_json = nil
16
- begin
16
+ begin
17
17
  build_verify_json = JSON.parse(File.read(build_verify_file))
18
18
  rescue => error
19
19
  end
@@ -37,7 +37,7 @@ module Pindo
37
37
  end
38
38
  rescue => error
39
39
  raise Informative, "获取Podfile.lock 文件失败!!!"
40
- end
40
+ end
41
41
  end
42
42
 
43
43
 
@@ -52,7 +52,7 @@ module Pindo
52
52
  checksum = Digest::MD5.hexdigest(bytes)
53
53
  build_verify_file = File.join(app_config_dir, "build_verify.json")
54
54
  build_verify_json = nil
55
- begin
55
+ begin
56
56
  build_verify_json = JSON.parse(File.read(build_verify_file))
57
57
  rescue => error
58
58
  end
@@ -61,7 +61,7 @@ module Pindo
61
61
  build_verify_json["output_config_commit"] = git_latest_commit_id(local_repo_dir:app_config_dir)
62
62
  build_verify_json["output_podfile_checksum"] = checksum
63
63
  build_verify_json["output_time"] = Time.now.strftime('%y/%m/%d %H:%M:%S')
64
-
64
+
65
65
  File.open(build_verify_file, "w") do |file|
66
66
  file.write(JSON.pretty_generate(build_verify_json))
67
67
  file.close
@@ -70,26 +70,26 @@ module Pindo
70
70
 
71
71
  rescue => error
72
72
  raise Informative, "保存Podfile.lock 文件失败!!!"
73
- end
73
+ end
74
74
  end
75
75
 
76
76
  def install_google_plist(project_dir:nil, app_config_dir:nil)
77
77
 
78
78
  project_fullname = Dir.glob(File.join(project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
79
- project_obj = Xcodeproj::Project.open(project_fullname)
79
+ project_obj = Xcodeproj::Project.open(project_fullname)
80
80
  select_target = project_obj.targets.select { |target| target.product_type.include?(Xcodeproj::Constants::PRODUCT_TYPE_UTI[:application]) }.first
81
81
  file_ref = select_target.resources_build_phase.files_references.select { |file| file.display_name.include?("GoogleService-Info.plist") }.first
82
-
82
+
83
83
  if !file_ref.nil?
84
84
  xcode_googleinfo_path = file_ref.real_path
85
-
86
- if !File.exist?(File.join(app_config_dir, "GoogleService-Info.plist"))
85
+
86
+ if !File.exist?(File.join(app_config_dir, "GoogleService-Info.plist"))
87
87
  raise Informative, "缺少 GoogleService-Info.plist ==> #{app_config_dir}!!!"
88
88
  else
89
89
  FileUtils.cp(File.join(app_config_dir, "GoogleService-Info.plist"), xcode_googleinfo_path)
90
90
  end
91
-
92
- if !File.exist?(xcode_googleinfo_path)
91
+
92
+ if !File.exist?(xcode_googleinfo_path)
93
93
  raise Informative, "拷贝 GoogleService-Info.plist 失败!!==> #{xcode_googleinfo_path}!!!"
94
94
  end
95
95
  end
@@ -120,7 +120,7 @@ module Pindo
120
120
  target_name_map = get_target_name_map
121
121
  if target.product_type.include?(Xcodeproj::Constants::PRODUCT_TYPE_UTI[:application])
122
122
  target.build_configurations.each do |config|
123
- config.build_settings['PRODUCT_NAME'] = exe_binary_name
123
+ config.build_settings['PRODUCT_NAME'] = exe_binary_name
124
124
  config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = ios_deployment_targe
125
125
  end
126
126
  elsif
@@ -151,64 +151,67 @@ module Pindo
151
151
  if !info_plist_dict["CFBundleName"].nil?
152
152
  info_plist_dict["CFBundleName"] = exe_binary_name
153
153
  end
154
-
155
- if config_json['app_info']["imessage_display_name"] && target_name && target_name.end_with?("iMessage")
154
+
155
+ if config_json['app_info']["imessage_display_name"] && target_name && target_name.end_with?("iMessage")
156
156
  info_plist_dict["CFBundleDisplayName"] = config_json['app_info']["imessage_display_name"]
157
157
  end
158
- if config_json['app_info']["extension_display_name"] && target_name && target_name.end_with?("Extension")
158
+ if config_json['app_info']["extension_display_name"] && target_name && target_name.end_with?("Extension")
159
159
  info_plist_dict["CFBundleDisplayName"] = config_json['app_info']["extension_display_name"]
160
160
  end
161
161
 
162
162
 
163
- if config_json['app_info']["extensionad_display_name"] && target_name && target_name.end_with?("ExtensionAd")
163
+ if config_json['app_info']["extensionad_display_name"] && target_name && target_name.end_with?("ExtensionAd")
164
164
  info_plist_dict["CFBundleDisplayName"] = config_json['app_info']["extensionad_display_name"]
165
165
  end
166
166
 
167
- if config_json['app_info']["extensionporn_display_name"] && target_name && target_name.end_with?("ExtensionPorn")
167
+ if config_json['app_info']["extensionporn_display_name"] && target_name && target_name.end_with?("ExtensionPorn")
168
168
  info_plist_dict["CFBundleDisplayName"] = config_json['app_info']["extensionporn_display_name"]
169
169
  end
170
-
171
- if config_json['app_info']["keyboard_display_name"] && target_name && target_name.end_with?("Keyboard")
170
+
171
+ if config_json['app_info']["keyboard_display_name"] && target_name && target_name.end_with?("Keyboard")
172
172
  info_plist_dict["CFBundleDisplayName"] = config_json['app_info']["keyboard_display_name"]
173
173
  end
174
-
175
174
 
176
- if config_json['app_info']["siri_display_name"] && target_name && target_name.end_with?("Keyboard")
175
+
176
+ if config_json['app_info']["siri_display_name"] && target_name && target_name.end_with?("Keyboard")
177
177
  info_plist_dict["CFBundleDisplayName"] = config_json['app_info']["siri_display_name"]
178
178
  end
179
179
 
180
- if config_json['app_info']["siriui_display_name"] && target_name && target_name.end_with?("iMessage")
180
+ if config_json['app_info']["siriui_display_name"] && target_name && target_name.end_with?("iMessage")
181
181
  info_plist_dict["CFBundleDisplayName"] = config_json['app_info']["siriui_display_name"]
182
182
  end
183
-
183
+
184
184
 
185
185
 
186
186
  unless config_json['app_info']["app_version"]
187
187
  raise Informative, "config.json Missing app_info app_version !!!"
188
- end
188
+ end
189
189
 
190
190
  info_plist_dict["CFBundleShortVersionString"] = config_json['app_info']["app_version"]
191
191
 
192
192
  unless config_json['app_info']["app_build_version"]
193
193
  raise Informative, "config.json Missing app_info app_build_version !!!"
194
- end
194
+ end
195
195
  info_plist_dict["CFBundleVersion"] = config_json['app_info']["app_build_version"]
196
196
  Xcodeproj::Plist.write_to_path(info_plist_dict, plist_file_name)
197
197
  end
198
198
  end
199
199
 
200
-
200
+
201
201
  def modify_maintarget_info_plist(plist_file_name:nil, config_json:nil, target_name:nil)
202
202
  if File.exist?(plist_file_name)
203
203
  info_plist_dict = Xcodeproj::Plist.read_from_path(plist_file_name)
204
204
 
205
205
  info_plist_dict.delete("AccountKitClientToken")
206
-
207
- if info_plist_dict["Fabric"]
206
+
207
+ if info_plist_dict["Fabric"]
208
208
  info_plist_dict.delete('Fabric')
209
209
  end
210
210
 
211
-
211
+ if info_plist_dict["UIRequiredDeviceCapabilities"] && !info_plist_dict["UIRequiredDeviceCapabilities"].first.nil? && info_plist_dict["UIRequiredDeviceCapabilities"].first == "armv7"
212
+ raise Informative, "Info.plist里面有多余的Key UIRequiredDeviceCapabilities armv7"
213
+ end
214
+
212
215
  if !config_json['app_info']['admob_app_id'].nil? && config_json['app_info']['admob_app_id'].include?("__________config")
213
216
  raise Informative, "config.json 配置文件key :admob_app_id 包含初始值未修改, 配置正确的值或者删除!!!"
214
217
  end
@@ -217,7 +220,7 @@ module Pindo
217
220
  raise Informative, "工程Info.plist中有 Admob 配置,config.json缺少 Admob 配置参数!!!"
218
221
  end
219
222
 
220
- if !config_json['app_info']['admob_app_id'].nil?
223
+ if !config_json['app_info']['admob_app_id'].nil?
221
224
  info_plist_dict["GADApplicationIdentifier"] = config_json['app_info']['admob_app_id']
222
225
  end
223
226
 
@@ -227,7 +230,7 @@ module Pindo
227
230
  if !config_json['app_info']['applovin_app_id'].nil? && config_json['app_info']['applovin_app_id'].include?("__________config")
228
231
  raise Informative, "config.json 配置文件key :applovin_app_id 包含初始值未修改, 配置正确的值或者删除!!!"
229
232
  end
230
-
233
+
231
234
  if !info_plist_dict["AppLovinSdkKey"].nil? && config_json['app_info']['applovin_app_id'].nil?
232
235
  raise Informative, "工程Info.plist中有 AppLovin 配置,config.json缺少 AppLovin 配置参数!!!"
233
236
  end
@@ -246,10 +249,10 @@ module Pindo
246
249
  # info_plist_dict.delete('AppLovinSdkKey')
247
250
  # end
248
251
 
249
-
250
252
 
251
-
252
-
253
+
254
+
255
+
253
256
  info_plist_dict["CFBundleURLTypes"] = []
254
257
  item0 = {}
255
258
  item0["CFBundleTypeRole"] = "Editor"
@@ -257,7 +260,7 @@ module Pindo
257
260
  item0["CFBundleURLSchemes"] = []
258
261
  item0["CFBundleURLSchemes"] << "$(PRODUCT_BUNDLE_IDENTIFIER)"
259
262
  info_plist_dict["CFBundleURLTypes"] << item0
260
-
263
+
261
264
  if config_json['app_info'] && config_json['app_info']['facebook_app_id']
262
265
  info_plist_dict["FacebookAppID"] = config_json['app_info']['facebook_app_id']
263
266
  if config_json['app_info']['facebook_client_token'].nil?
@@ -294,7 +297,7 @@ module Pindo
294
297
  info_plist_path = File.join(project_dir, temp_info)
295
298
 
296
299
  if target.product_type.to_s.eql?("com.apple.product-type.application") && !File.exist?(info_plist_path)
297
- raise Informative, "Missing Target #{target.name.to_s} Info.plist !!! Modify Info.plist Error !!!"
300
+ raise Informative, "Missing Target #{target.name.to_s} Info.plist !!! Modify Info.plist Error !!!"
298
301
  end
299
302
 
300
303
  if target.product_type.to_s.eql?("com.apple.product-type.application") then
data/lib/pindo/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Pindo
2
2
 
3
- VERSION = "4.7.2"
3
+ VERSION = "4.7.3"
4
4
 
5
5
  class VersionCheck
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pindo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.2
4
+ version: 4.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - wade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide
@@ -119,7 +119,7 @@ dependencies:
119
119
  version: 0.1.0
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 0.1.6
122
+ version: 0.1.9
123
123
  type: :runtime
124
124
  prerelease: false
125
125
  version_requirements: !ruby/object:Gem::Requirement
@@ -129,7 +129,7 @@ dependencies:
129
129
  version: 0.1.0
130
130
  - - ">="
131
131
  - !ruby/object:Gem::Version
132
- version: 0.1.6
132
+ version: 0.1.9
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: rqrcode
135
135
  requirement: !ruby/object:Gem::Requirement