Tạo một dự án và xác định nơi mà nó được lưu trữ Chọn mẫu dự án phải Juggling nhiều dự án Cấu hình các thuộc tính dự án cụ thể Bây giờ bạn có thể di chuyển xung quanh và tùy biến giao diện Xcode xem của nó, đó là thời gian để tìm hiểu làm thế nào các dự án được tạo ra, lưu trữ, mở ra, và đóng lại. Mỗi dự án có hai phần cơ bản: các văn kiện dự án và thư mục các dự án. Văn kiện dự án, trong hình 4 -1, chứa. | 4 The Project WHAT S IN THIS CHAPTER Creating a project and defining where it s stored Choosing the right project template Juggling multiple projects Configuring project-specific properties Now that you can navigate around the Xcode interface and customize its view it s time to learn how projects are created stored opened and closed. Every project has two essential parts the project document and the project folder. The project document in Figure 4-1 contains all of the structure references layout settings preferences and other attributes that define the project. FIGURE 4-1 Download at 42 CHAPTER 4 THE PROJECT The folder that contains the project document is the project folder in this case the Simple folder. This is the root location for the project. The project document and project folder usually have the same name but that s not a requirement and a project folder can contain multiple project documents. CREATING A NEW PROJECT You create a new empty project using the File New Project command Shift Command N . This opens the New Project Assistant shown in Figure 4-2. FIGURE 4-2 Empty is a bit of a misnomer. The New Project Assistant creates a new project using one of the many project templates that are built into Xcode. The project it creates will be far from empty and may actually have quite a lot in it before you even begin. The templates try to provide the basic framework a main function an empty subclass of NSDocument a menu bar with all the standard items required driver entry points scores of build settings and so on all appropriate to the type of project you are creating. The templates also include the libraries and frameworks a project of that type is expected to need. Some templates go the extra mile and include libraries and frameworks that you re just likely to need. These frameworks are referred to by the project but are not members of any targets. Being included in the project already it s a trivial matter to add them to