Mục tiêu là những công cụ của Xcode. Họ defi ne các bước mà sẽ biến đổi mã nguồn của bạn và tài nguyên fi les thành một sản phẩm nished fi. Mục tiêu có thể rất phức tạp hoặc ridiculously đơn giản. | 16 Targets WHAT S IN THIS CHAPTER Creating targets Adding source items to targets Defining target dependencies Customizing targets Targets are the engines of Xcode. They define the steps that will transform your source code and resource files into a finished product. Targets can be very complex or ridiculously simple. Xcode comes with targets that automatically take care of the myriad details needed to produce standard products such as application bundles or you can take complete control and choose a target that abdicates all of the responsibility for building a product to you. The purpose of a target is to produce something. Most targets produce a product. There are different types of targets depending on what kind of product is being produced. Each target refers to the source files and resources required to produce its product along with the instructions on how those source files get transformed how the product is assembled and the order in which all of those things happen. Targets appear in the Targets smart group of the project window as shown in Figure 16-1. Most project templates come with a target already defined appropriately configured for that project type. If you stick to developing simple applications and tools you may never need to add a target to an existing project. Nevertheless understanding what a target is and does is a prerequisite to customizing one and is fundamental to understanding the build process as a whole. Download at 340 I CHAPTER 16 TARGETS Pl ACocoaApp I Debug I x86 64 Overview Action Groups Files s ACocoaApp Breakpoints Build and Run Tasks Info Role Ej Other Sources r Resources r Frameworks P Products Targets -s ACocoaApp H Copy Bundle Resources 2 j Compile Sources 2 Link Binary With Libraries 1 Copy Files Executables JA EincLResjjJts__ ll File Name m ACocoaApp Del eg ate. m Cocoa fram e work iF English m a English String Matching Search Code I Required FIGURE 16-1 .