๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
iOS ๐ŸŽ/iOS

Xcode Target, Project, Workspace

by yongmin.Lee 2021. 12. 6.

Xcode๋ฅผ ์ด์šฉํ•˜๋‹ค๋ณด๋ฉด ์œ„์ฒ˜๋Ÿผ Project, Workspace, Target๋“ฑ์„ ์ ‘ํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ ์ •ํ™•ํžˆ ์ง‘์–ด๋ณด์ž

 

 

Target

  • A target specifies a product to build and contains the instructions for building the product from a set of files in a project or workspace.
  • A target defines a single product → ํ•˜๋‚˜์˜ ํƒ€๊ฒŸ์€ ํ•˜๋‚˜์˜ ํ”„๋กœ๋•ํŠธ
  • target์ด ์ƒ์„ฑํ•˜๋Š” ์ œํ’ˆ์ด, ๋˜ ๋‹ค๋ฅธ target๊ณผ ๊ด€๋ จ๋  ์ˆ˜ ์žˆ๋Š”๋ฐ ์ด๊ฒฝ์šฐ Xcode๋Š” ์•Œ์•„์„œ ํ•„์š”ํ•œ ์ˆœ์„œ๋Œ€๋กœ product๋ฅผ build → ์ž๋™์œผ๋กœ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๋จผ์ € ๋นŒ๋“œํ•˜๊ณ  ์ดํ›„ ๊ด€๊ณ„๋œ ํƒ€๊ฒŸ ๋นŒ๋“œ
  • ํ•˜๋‚˜์˜ project์•ˆ์— ์—ฌ๋Ÿฌ target๋“ค์€ ํ•ด๋‹น proejct์˜ Build Setting์„ ์ƒ์†๋ฐ›์ง€๋งŒ target๋ณ„๋กœ Build Settings, Build Phases๋ฅผ overrideํ•˜์—ฌ ์„ค์ •์„ ๋‹ค๋ฅด๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋‹ค.

Project

  • An Xcode project is a repository for all the files, resources, and information required to build one or more software products.
  • ํ”„๋กœ์ ํŠธ์—๋Š” product๋ฅผ ๋งŒ๋“œ๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๋ชจ๋“  ์š”์†Œ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์œผ๋ฉฐ, ํ•ด๋‹น ์š”์†Œ๊ฐ„์˜ ๊ด€๊ณ„๊ฐ€ ์œ ์ง€๋œ๋‹ค
  • ํƒ€๊ฒŸ๋“ค์€ ์ฝ”๋“œ์™€ ๋ฆฌ์†Œ์Šค๋ฅผ ๊ณต์œ ํ•˜๊ฑฐ๋‚˜ ์ƒํ˜ธ๊ฐ„์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์†ก์ˆ˜์‹ ํ•˜๋Š”๋“ฑ์˜ ๊ด€๊ณ„๊ฐ€ ํ˜•์„ฑ๋˜์–ด ์žˆ๋Š”๋ฐ ์ด๋Ÿฐ ์—ฐ๊ด€๊ด€๊ณ„์˜ target๋“ค์€ Project ์•ˆ์— ๊ทธ๋ฃน๋˜์–ด ์žˆ๋‹ค
  • ํ”„๋กœ์ ํŠธ๊ฐ€ ํฌํ•จํ•˜๊ณ  ์žˆ๋Š” ์ •๋ณด
    • References to source files
    • Groups used to organize the source files in the structure navigator
    • Project-level build configurations. You can specify more than one build configuration for a project; for example, you might have debug and release build settings for a project.
    • Targets
    • The executable environments that can be used to debug or test the program

WorkSpace

  • A workspace is an Xcode document that groups projects and other documents so you can work on them together.
  • A workspace can contain any number of Xcode projects, plus any other files you want to include.
  • In addition to organizing all the files in each Xcode project, a workspace provides implicit and explicit relationships among the included projects and their targets.
  • Pods ํ”„๋กœ์ ํŠธ์™€ ๊ธฐ์กด ํ”„๋กœ์ ํŠธ ์‚ฌ์ด์˜ ๊ด€๊ณ„์ฒ˜๋Ÿผ ํ•˜๋‚˜์˜ ํ”„๋กœ์ ํŠธ๋Š” ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ์— ์˜ํ•ด ์‚ฌ์šฉ๋˜์–ด ์งˆ ์ˆ˜ ์žˆ๋Š”๋ฐ ์ด๋Ÿฐ ํ”„๋กœ์ ํŠธ๊ฐ„์˜ ๊ด€๊ณ„๋ฅผ ๋™์ผํ•œ ๊ณ„์ธต๋ ˆ๋ฒจ๋กœ ๊ด€๋ฆฌํ•˜๋Š”๊ฒƒ์ด workspace์ด๋‹ค.

 

์ฐธ๊ณ 

'iOS ๐ŸŽ > iOS' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Notification Service Extension  (0) 2021.12.06
App Extension  (0) 2021.12.06
APNS, Apple Push Notification Service  (0) 2021.12.06
Responder chain (1)  (0) 2021.12.06
[Objective-C] atomic vs nonatomic  (0) 2021.12.06