- Workspaces Defined
- When to Use a Workspace
- Creating the Lighting Suite Workspace
- Wrapping Up
Creating the Lighting Suite Workspace
Creating a workspace is easy. Choose File > New > Workspace from the main menu. A new workspace window will appear, with a Save As sheet prompting you for a location in which to save it (Figure 4.1). Again, I recommend the desktop for convenience. Create a folder called Lighting Suite to hold everything, and select it. Name the workspace Lighting Suite and click Save.
FIGURE 4.1. Saving a workspace
You’ll be presented with an eerily empty workspace window, whose workspace file lives inside the Lighting Suite folder you created. Now on to the projects. As mentioned, we’ll need two projects: the Mac app and the iOS app. The projects will live inside the Lighting Suite folder, along with the workspace, for good organization.
Adding Projects to the Workspace
Now we’ll create the individual projects.
Let’s do iOS first. This project will contain a universal app that will work on iPhones, iPod touches, and iPads. Choose File > New > Project. Pick the iOS Application category, and select the Single View Application template. Click Next. We’ll call this product Flashlight.
Accept the rest of the defaults (Use Storyboards, Use Automatic Reference Counting, Include Unit Tests), but choose Universal from the Devices menu. Click Next. You can choose whether or not you want to create a Git repository for the project, but make sure that you choose Lighting Suite from the Add To menu (Figure 4.2). Also make sure the main Lighting Suite folder is selected, and click Create.
FIGURE 4.2. Adding the project to a workspace using the Add To menu
Now for the desktop version of Flashlight, Lamp.app. Choose File > New > Project, and select the OS X Application category. Pick Cocoa Application, and click Next. We’ll call this product Lamp. This time we want to select Use Core Data, Use Automatic Reference Counting, and Include Unit Tests (we don’t want a Spotlight importer). Click Next. Choose Lighting Suite from the Add To menu, and make sure the main Lighting Suite folder is selected to ensure the projects are kept together. This time, an extra Group option appears when you’re asked to save. Make sure the group is set to the Lighting Suite workspace. Again, you can select “Create local git repository for this project” if you wish. You should end up with a workspace that looks like Figure 4.3, all contained within the Lighting Suite folder in Finder.
FIGURE 4.3. A freshly minted workspace containing two projects