๋‚ด๊ฐ€ ๊ธฐ์กด์— ๋งŒ๋“ค์—ˆ๋˜ ๊ฐ•์•„์ง€ ๋ฐฅ์ฃผ๋Š” ์•ฑ(DogFood โ€ฆ)๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์„ค๋ช…ํ•ด๋ณด๊ฒ ๋‹ค.

PROJECT_FILE_NAME.xcodeproj

์ด๋…€์„์˜ ์ •์ฒด๋Š” ํŒŒ์ผ์ด ์•„๋‹ˆ๋‹ค. ๋””๋ ‰ํ† ๋ฆฌ๋‹ค! ์šฐํด๋ฆญํ›„ โ€œํŒจํ‚ค์ง€ ๋‚ด์šฉ๋ณด๊ธฐโ€๋กœ ๋‚ด๋ถ€๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

๋“ค์–ด๊ฐ€๊ฒŒ ๋˜๋ฉด, 3๊ฐœ์˜ ํŒŒ์ผ์ด ๋ณด์ธ๋‹ค. ๊ฐ๊ฐ ์•Œ์•„๋ณด์ž

๋ชจ์ข…์˜ ์ด์œ ๋กœ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ˆœ์„œ๋กœ ์„ค๋ช…ํ•˜๊ฒ ๋‹ค.

  1. xcuserdata
  2. project.pbxproj
  3. project.xcworkspace

xcuserdata

ํ”„๋กœ์ ํŠธ ์ž์ฒด์— ํฌ๊ฒŒ ์˜ํ–ฅ์„ ์ฃผ์ง€ ์•Š๋Š” โ€œ๊ฐœ์ธ ์„ค์ •โ€์„ ๋‹ด์€ ๋””๋ ‰ํ† ๋ฆฌ

์‹ค์ œ ๋‚ด๋ถ€๋ฅผ ๋ณด๋ฉด, break point์™€ ๊ฐ™์€ ๊ฒƒ๋“ค์ด ๋“ค์–ด๊ฐ€ ์žˆ๋‹ค.

project.pbxproj

ํ”„๋กœ์ ํŠธ ๋‚ด๋ถ€ ํŒŒ์ผ๋“ค์˜ Reference๋ฅผ ํŒŒ์ผ ์œ ํ˜•์— ๋”ฐ๋ผ ์ €์žฅ

  • ๋ณด๋‹ค๋ณด๋‹ˆ ์–ด๋””์„œ ๋งŽ์ด ๋ณด๋˜ ์นœ๊ตฌ๋‹ค.
  • ํ˜‘์—…์‹œ conflict์˜ ์ฃผ๋ฒ”์ด๋‹ค.
  • ๋‘ ๋ช… ์ด์ƒ์˜ ํŒ€์›์ด ํŒŒ์ผ์˜ ์ˆœ์„œ๋ฅผ ๋ฐ”๊พธ๊ฑฐ๋‚˜, ๋™์‹œ์— ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ๋“ฑ๋“ฑ์˜ ํ–‰์œ„๋ฅผ ํ–ˆ์„ ๊ฒฝ์šฐ ์ถฉ๋Œ๋‚  ์ˆ˜ ์žˆ๋‹ค.
  • ์ž์‹ ์ด ํ•œ ์ž‘์—…๋งŒ ์ž˜ mergeํ•˜๊ฑฐ๋‚˜, ์„œ๋กœ ์–˜๊ธฐํ•˜๊ณ  ์ ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ทจํ•ด์•ผ ํ•œ๋‹ค.

project.xcworkspace

์–˜๋„ ๋””๋ ‰ํ† ๋ฆฌ๋‹ค!

๋“ค์–ด๊ฐ€๋ณด๋‹ˆ, ๋˜ ์ด์ƒํ•œ ๋…€์„๋“ค์ด ์žˆ๋‹ค. ํ•˜๋‚˜์”ฉ ์•Œ์•„๋ณด์ž.

xcuserdata

๋‚ด๋ถ€๋ฅผ ๋ณด๋‹ˆ, ์œ„์— ์ตœ์ƒ์œ„ ํด๋”์—์„œ ๋ณด์•˜๋˜ xcuserdata์™€ ๊ฐ™๋‹ค.

xcshareddata

workspace์— ๊ณต์œ ๋œ ์„ค์ •์„ ๋‹ด์€ ๋””๋ ‰ํ† ๋ฆฌ

contents.xcworkspacedata

ํ”„๋กœ์ ํŠธ์˜ Reference๋ฅผ ์ €์žฅํ•˜๊ณ  ์žˆ๋Š” ํŒŒ์ผ

์ด ํ”„๋กœ์ ํŠธ๋Š” ๋‹จ์ˆœํ•œ ํ”„๋กœ์ ํŠธ๋ผ ํ”„๋กœ์ ํŠธ๊ฐ€ ์—ฐ๊ฒฐ๋˜์–ด ์žˆ์ง€ ์•Š๋‹ค. ํ•˜์ง€๋งŒ..

๊ฑฐ๋Œ€ํ•œ ํ”„๋กœ์ ํŠธ์˜ ๊ฒฝ์šฐ, ๋ชจ๋“ˆํ™”๋ฅผ ํ†ตํ•ด ํ”„๋กœ์ ํŠธ๋ฅผ ๋‚˜๋ˆ„๊ณ , ๊ทธ ํ”„๋กœ์ ํŠธ๋“ค์„ ํ•œ ํ”„๋กœ์ ํŠธ์— ๋‹ค์‹œ ์—ฎ์–ด์„œ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ์ด๋Ÿฐ ๊ฒฝ์šฐ๋Š” ์œ„์™€ ๊ฐ™์ด ์ƒ๋‹นํžˆ ํŒŒ์ผ์ด ๋ฐฉ๋Œ€ํ•ด์ง„๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

PROJECT_FILE_NAME.xcworkspace

์ด๋…€์„๋„ ๋””๋ ‰ํ† ๋ฆฌ๋‹ค!

์–ด? ๊ทธ๋Ÿฐ๋ฐ ์ƒ๋‹นํžˆ ์ต์ˆ™ํ•œ ํ™”๋ฉด์ด๋‹ค. ์œ„์— ์žˆ๋Š” PROJECT_FILE_NAME.xcproject ๋‚ด๋ถ€์˜ project.xcworkspace์™€ ๋˜‘๊ฐ™์ด ์ƒ๊ฒผ๋‹ค.

๊ทธ๋Ÿฐ๋ฐ, ์‹ค์ œ contents.scworkspacedata ๋ฅผ ๋“ค์–ด๊ฐ€๋ณด๋ฉด ์•ฝ๊ฐ„ ๋‹ค๋ฅด๋‹ค.

์œ„์˜ project.xcworkspacedata/contents.xcworkspacedata ์˜ ๊ฒฝ์šฐ์™€ ๋‹ค๋ฅด๊ฒŒ ์ƒ๊ฒผ๋‹ค.

์ง€๊ธˆ ์„ค๋ช…ํ•˜๋Š” PROJECT_FILE_NAME.xcworkspace์˜ ๊ฒฝ์šฐ, cocoaPods๊ฐ€ ์ƒ์„ฑํ•ด์ฃผ๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค๋ฅธ contents ๋‚ด์—ญ์„ ๊ฐ€์ง„๋‹ค. ์‹ค์ œ๋กœ ๋ณด๋ฉด, Pods ํ”„๋กœ์ ํŠธ๊ฐ€ ์—ฐ๊ฒฐ๋˜์–ด ์žˆ์Œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

CocoaPods์˜ pod install์„ ํ•˜๋ฉด, ์ด .xcworkspace ๊ฐ€ ์ƒ์„ฑ๋˜๋Š” ๊ฒƒ์ด๋‹ค! ์ฆ‰, ๋ณธ๋ž˜ ํ”„๋กœ์ ํŠธ์™€ ๋ณ„๋„๋กœ Project๋ฅผ ๋งŒ๋“ค์–ด์„œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์˜์กด์„ฑ์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ๊ฒƒ. ๊ฒฐ๊ณผ์ ์œผ๋กœ ๋‚ด๊ฐ€ ๋งŒ๋“  Project, Pod Project๋ฅผ ์—ฎ์–ด contents์— ์ ์–ด๋‘๊ณ , PROJECT_NAME.xcworkspace๋กœ ๊ด€๋ฆฌํ•˜๋ผ๋Š” ๊ฒƒ. ๊ทธ๋ž˜์„œ cocoaPods๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด .xcworkspace๋กœ ์ž‘์—…ํ•ด์•ผ ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

Reference