module IOS class TuistCommands def initialize() end def generateExample(open_workspace = true) current_directory = File.basename(Dir.pwd) if current_directory == "Example" puts "Rodando " + "tuist generate".magenta + " no projeto Exemplo" system('tuist generate --no-open') if File.exist?("Podfile") puts "Rodando " + "pod install".magenta + " no projeto Exemplo" system("pod install") else puts "\n❌ Arquivo Podfile não encontrado!".red end if File.exist?("Example.xcworkspace") system('open Example.xcworkspace') if open_workspace else puts "\n❌ Arquivo Example.xcworkspace não encontrado!".red end else puts "Navegue até o diretório do Example!".red end end def build puts "Rodando " + "tuist build".magenta system('tuist build') end end end