Skip to content

Commit 8d7ad6f

Browse files
committed
Improve Xcode starter/existing files
1 parent d4f51c1 commit 8d7ad6f

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

docs/images/xcode340.png

242 KB
Loading

docs/images/xcode350.png

1020 KB
Loading

docs/images/xcode360.png

762 KB
Loading

docs/setup_xcode.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,12 @@ You should see your new file in the sidebar.
121121

122122
<img src="images/xcode119.png" width="768px" />
123123

124-
### Add existing files
125-
If you have starter files, add them to your project directory. This example is from [EECS 280 Project 1](https://eecs280staff.github.io/stats/), but this tutorial doesn't require understanding the files. Your URL or files might be different.
124+
### Add starter files
125+
This example is from [EECS 280 Project 1](https://eecs280staff.github.io/stats/), but this tutorial doesn't require understanding the files. Your URL or files might be different.
126+
127+
<div class="primer-spec-callout warning" markdown="1">
128+
**Pitfall:** Don’t just drag starter files downloaded with your browser directly into Xcode. This may not place them in the correct project folder. If you want to use those files, skip to the [next section](#move-existing-files) for the correct steps. Otherwise, keep following this section without using any previously downloaded files.
129+
</div>
126130

127131
<div class="primer-spec-callout warning" markdown="1">
128132
**Pitfall:** Make sure you're in the directory containing your source code.
@@ -180,6 +184,25 @@ Select a file and press <kbd>Enter</kbd>. Change the file name. In EECS 280, y
180184

181185
| <img src="images/xcode120.png" width="192px" /> | <img src="images/xcode125.png" width="192px" /> |
182186

187+
### Move existing files
188+
If you already have existing files elsewhere on your computer, you can also add them to your project. For example, if you want to use any files downloaded with your browser, they were likely saved to your Downloads folder and you'll need to move them into your project folder.
189+
190+
Use the menu and select: File > Add Files to "p1-stats"... (this will vary depending on your project's name).
191+
192+
<img src="images/xcode340.png" width="384px" />
193+
194+
Navigate to the directory with your existing files and select the ones you want to move. To select multiple files at once, you can hold down <kbd>Command</kbd> while clicking. You can also press <kbd>Command</kbd> + <kbd>a</kbd> to select all files. Once you've made your selection, click "Add".
195+
196+
<img src="images/xcode350.png" width="768px" />
197+
198+
Select "Move files to destination" as the action. You may also select "Copy files to destination" if you wish to leave the original files untouched, but do *not* select "Reference files in place". Do *not* select any targets. Click "Finish".
199+
200+
<img src="images/xcode360.png" width="768px" />
201+
202+
You will now see your files in the sidebar.
203+
204+
<img src="images/xcode110.png" width="256px" />
205+
183206
## Compile and Run
184207
An Xcode target compiles (builds) one executable.
185208

0 commit comments

Comments
 (0)