Avatar
ご回答ありがとうございます! 直接xcodebuildを起動というのは、下記のコードの意図であっているでしょうか。 (xcodebuildの場所の確認) where xcodebuild /usr/bin/xcodebuild let pipe = Pipe() let process = Process() process.launchPath = "/usr/bin/xcodebuild" process.arguments = [ "-scheme", "BuildSampleProject", "-project", "/Users/ikeh/Downloads/tmp/BuildSampleProject/BuildSampleProject.xcodeproj", "-configuration", "Release", "-archivePath", "/Users/ikeh/Downloads/tmp/BuildSampleProject/build/BuildSampleProject.xcarchive", "archive", ] process.standardOutput = pipe process.launch() // isRunningがfalseにならない while process.isRunning { Thread.sleep(forTimeInterval: 0.5) } // process.waitUntilExit() // 同様にここで処理が止まる let data = pipe.fileHandleForReading.readDataToEndOfFile() let str = String(data: data, encoding: .utf8) ?? "" print(str) (edited)