Class: Pindo::IpaResignHelper
- Inherits:
-
Object
- Object
- Pindo::IpaResignHelper
- Defined in:
- lib/pindo/module/xcode/ipa_resign_helper.rb
Class Method Summary collapse
-
.resign_ipa(ipa_file_path: nil, bundle_id:) ⇒ String?
重签名 IPA 文件的主入口方法.
Class Method Details
.resign_ipa(ipa_file_path: nil, bundle_id:) ⇒ String?
重签名 IPA 文件的主入口方法
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/pindo/module/xcode/ipa_resign_helper.rb', line 15 def resign_ipa(ipa_file_path: nil, bundle_id:) ipa_path = find_ipa_file(ipa_file_path) if ipa_path.nil? || ipa_path.empty? puts "未找到 IPA 文件" return nil end # 准备重签名的 IPA(修改 Bundle ID) resign_result = prepare_resign_ipa(ipa_name: ipa_path, bundle_id: bundle_id) if resign_result.nil? || resign_result['resigned_ipa_path'].nil? puts "准备重签名 IPA 失败" return nil end puts "\n重签名信息:" puts " 原始 Bundle ID: #{resign_result['old_bundle_id']}" puts " 新的 Bundle ID: #{resign_result['new_bundle_id']}" puts " Display Name: #{resign_result['display_name']}" # 使用新证书签名 sign_ipa_with_new_cert( ipa_name: resign_result['resigned_ipa_path'], bundle_id: resign_result['new_bundle_id'] ) resign_result['resigned_ipa_path'] end |