Class: Pindo::Command::Ios::Fixproj
- Inherits:
-
Pindo::Command::Ios
- Object
- CLAide::Command
- Pindo::Command
- Pindo::Command::Ios
- Pindo::Command::Ios::Fixproj
- Defined in:
- lib/pindo/command/ios/fixproj.rb
Constant Summary
Constants inherited from Pindo::Command
DEFAULT_OPTIONS, DEFAULT_ROOT_OPTIONS
Instance Attribute Summary
Attributes inherited from Pindo::Command
Class Method Summary collapse
-
.options ⇒ Object
命令的选项列表.
Instance Method Summary collapse
-
#initialize(argv) ⇒ Fixproj
constructor
A new instance of Fixproj.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pindo::Command
command_name, #initialize_options, run, use_cache?
Methods included from Funlog::Mixin
Methods included from Pindoconfig::Mixin
Constructor Details
#initialize(argv) ⇒ Fixproj
Returns a new instance of Fixproj.
41 42 43 44 45 46 |
# File 'lib/pindo/command/ios/fixproj.rb', line 41 def initialize(argv) # 获取位置参数(项目路径) @project_path = argv.shift_argument super(argv) end |
Class Method Details
.options ⇒ Object
命令的选项列表
35 36 37 38 39 |
# File 'lib/pindo/command/ios/fixproj.rb', line 35 def self. [ # 暂无选项 ].concat(super) end |
Instance Method Details
#run ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/pindo/command/ios/fixproj.rb', line 52 def run # 确定项目路径 project_dir = @project_path && !@project_path.empty? ? @project_path : Dir.pwd project_dir = File.(project_dir) unless File.directory?(project_dir) raise Informative, "项目路径不存在: #{project_dir}" end puts "\n开始修复 Xcode 项目问题..." puts "项目路径: #{project_dir}\n" # 1. 修复 Xcode 16 的 linker flags 问题 puts "\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" puts " 修复 Xcode 16 Linker Flags" puts "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" begin Pindo::XcodeBuildHelper.fix_xcode16_linker_flags(project_dir: project_dir) rescue => e puts " ⚠️ 修复 Xcode 16 linker flags 失败: #{e.message}" end # 2. 删除 Unity-iPhone 项目中的 Firebase Crashlytics 脚本 puts "\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" puts " 删除 Firebase Crashlytics 脚本" puts "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" begin Pindo::XcodeBuildHelper.delete_libtarget_firebase_shell(project_dir) rescue => e puts " ⚠️ 删除 Firebase Crashlytics 脚本失败: #{e.message}" end puts "\n✅ 项目修复完成!\n" end |
#validate! ⇒ Object
48 49 50 |
# File 'lib/pindo/command/ios/fixproj.rb', line 48 def validate! super end |