0

I am using Xcode Project Renamer to rename my Xcode project, after that I used the code below to install pod file.

It's working good but the terminal showing result after pod installed. I want to show result while installing the pod.

@discardableResult
private func shell(_ command: String) -> String {
    let task = Process()
    task.launchPath = "/bin/bash"
    task.arguments = ["-c", command]

    let pipe = Pipe()
    task.standardOutput = pipe
    task.launch()
 //   pipe.fileHandleForReading.readDataToEndOfFile()

    let data = pipe.fileHandleForReading.readDataToEndOfFile()
    let output: String = NSString(data: data, encoding: String.Encoding.utf8.rawValue)! as String
    return output
}


    let command = shell("pod install")
    print(command)

Can someone help please.

enter image description here

Almudhafar
  • 887
  • 1
  • 12
  • 26

0 Answers0