Xcode Tips and Tricks - Part 9: Behaviors | Ray Wenderlich

Set up your perfect coding environment using behaviors and tabs. Learn how to create a script to open a Terminal window at the project folder.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3199-xcode-tips-and-tricks/lessons/9

Where is the sample app. I downloaded the materials but the sample app is not there.

@carlos - I hope you found the app - I just downloaded the materials for part 9 and the sample app is in the starter folder in the materials download.

Otherwise, use the app from the previous video. Except for splitting out the framework and targets, the app doesn’t change much throughout the course.

I did not find the project on the first video. I went onto the second video and I did find it, thank you.

Great tips in there! The one about opening a Terminal window is absolute gold. However, you should consider changing the script you use to get the folder of the project dynamically. I did it like this:

#! /bin/bash

open -a Terminal "$SRCROOT"

Save the script file somewhere safe, like in the folder where you keep your projects or some other permanent location, and have the Xcode behavior point to this location. From then on, this will work with any project, as long as you don’t delete or move the script from the specified location.

2 Likes

@3pdevelopment - I’m glad it helped

Thanks for the improvement suggestion :smiley:. That’s certainly better.

That’s what I want to do! Thanks :pray:

I’ve written a short tutorial about this: https://medium.com/@damjandimovski/open-terminal-from-xcode-9e4c10f7ace1

This topic was automatically closed after 166 days. New replies are no longer allowed.