Search code examples
iosxcodecarthage

How can I view the logs generated from the xcodebuild output?


I am currently downloading dependencies via Carthage. When it comes to error, I need to see the log details.

xcodebuild output can be found in /var/folders/fj/1kwwbqhx5r3d0dp1g1fgjwbw0000gn/T/carthage-xcodebuild.dCp7BC.log

Would you please help me hot to redirect to the logs using Terminals and Finder ?


Solution

  • You can use open like below. It will open the file with the default app of the extension.

    open /var/folders/fj/1kwwbqhx5r3d0dp1g1fgjwbw0000gn/T/carthage-xcodebuild.dCp7BC.log
    

    You can specify desired app with -a. For example below will open the file using TextEdit

    open /var/folders/fj/1kwwbqhx5r3d0dp1g1fgjwbw0000gn/T/carthage-xcodebuild.dCp7BC.log -a TextEdit
    

    Or you can just print it in the terminal using cat

    cat /var/folders/fj/1kwwbqhx5r3d0dp1g1fgjwbw0000gn/T/carthage-xcodebuild.dCp7BC.log
    

    Or you can just open the container folder in finder. Remember to delete the file name.

    open /var/folders/fj/1kwwbqhx5r3d0dp1g1fgjwbw0000gn/T/