์ ์ฒด ๊ธ (95) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ [N/W] OSI 7๊ณ์ธต์ด๋? - OSI ๊ณ์ธต๋ณ ํน์ง, TCP/IP 4๊ณ์ธต OSI 7 ๊ณ์ธต์ด๋? OSI 7 ๊ณ์ธต์ ๋คํธ์ํฌ ํต์ ์ด ์ผ์ด๋๋ ๊ณผ์ ์ 7๋จ๊ณ๋ก ๋๋ ๊ตญ์ ํ์คํ ๊ธฐ๊ตฌ(ISO)์์ ์ ์ํ ๋คํธ์ํฌ ํ์ค ๋ชจ๋ธ ์๋ ๊ทธ๋ฆผ์์ ์๋๋ถํฐ 1๊ณ์ธต(๋ฌผ๋ฆฌ ๊ณ์ธต) ~ 7๊ณ์ธต(์์ฉ ๊ณ์ธต)์ผ๋ก ๊ตฌ์ฑ๋์ด ์๋ค. ๋ ๊ทธ๋ฆผ๊ณผ ๊ฐ์ด ๊ฐ ๊ณ์ธต์ ์ง๋ ๋๋ง๋ค ๊ฐ ๊ณ์ธต์์ Header๊ฐ ๋ถ๊ฒ๋๊ณ ์์ ์ธก์ ์ญ์์ผ๋ก ํค๋๋ฅผ ๋ถ์ํ๊ฒ ๋๋ค. ๐ฑ 1๊ณ์ธต - ๋ฌผ๋ฆฌ๊ณ์ธต(Physical Layer) ์ฃผ๋ก ์ ๊ธฐ์ , ๊ธฐ๊ณ์ , ๊ธฐ๋ฅ์ ์ธ ํน์ฑ์ ์ด์ฉํด์ ํต์ ์ผ์ด๋ธ๋ก ๋ฐ์ดํฐ๋ฅผ ์ ์กํ๋ ๋ฌผ๋ฆฌ์ ์ธ ์ฅ๋น ๋จ์ง ๋ฐ์ดํฐ ์ ๊ธฐ์ ์ธ ์ ํธ(0,1)๋ก ๋ณํํด์ ์ฃผ๊ณ ๋ฐ๋ ๊ธฐ๋ฅ๋ง ํ ๋ฟ ์ด ๊ณ์ธต์์ ์ฌ์ฉ๋๋ ํต์ ๋จ์ : ๋นํธ(Bit)์ด๋ฉฐ ์ด๊ฒ์ 1๊ณผ 0์ผ๋ก ๋ํ๋ด์ด์ง๋, ์ฆ ์ ๊ธฐ์ ์ผ๋ก On, Off ์ํ ์ฅ๋น : ํต์ ์ผ์ด๋ธ, ๋ฆฌํผํฐ.. [N/W] JSON์ด๋? - JSON ๊ตฌ์กฐ, JSON ๋ฐ์ดํฐ ํ์ , JSON Array ์๋ฒ์ ํด๋ผ์ด์ธํธ ๊ฐ ๋ฐ์ดํฐ ๊ตํ์ ์ํด ๊ผญ ์์์ผ ํ๋ JSON์ ๋ํด ์์๋ณด์๐ ํน์ ํ๋ก๊ทธ๋๋ฐ ๋ฌธ๋ฒ์ด ์๋ ๋จ์ํ ๋ฐ์ดํฐ๋ฅผ ํ์ํ๋ ํํ ๋ฐฉ๋ฒ์ผ๋ก ์ด๋ค ์์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ๋ณด์ฌ์ฃผ๋์ง ํ์ ํ๋ฉด ๋๋ค! ๐ก JSON์ด๋? JavaScript Object Notation์ ์ฝ์๋ก '์๋ฐ ์คํฌ๋ฆฝํธ ๊ฐ์ฒด ํ๊ธฐ๋ฒ'. ๋ฐ์ดํฐ๋ฅผ ์ฝ๊ฒ ' ๊ต ํ ' ํ๊ณ ' ์ ์ฅ ' ํ๊ธฐ ์ํ ํ ์คํธ ๊ธฐ๋ฐ์ ๋ฐ์ดํฐ ๊ตํ ํ์ค. ๐ก JSON ๊ตฌ์กฐ JSON์ ์๋ฐ์คํฌ๋ฆฝํธ์ ๊ฐ์ฒด ํ๊ธฐ๋ฒ์ผ๋ก๋ถํฐ ํ์๋ ๋ถ๋ถ ์งํฉ. ๋ฐ๋ผ์ JSON ๋ฐ์ดํฐ๋ ๋ค์๊ณผ ๊ฐ์ ์๋ฐ์คํฌ๋ฆฝํธ ๊ฐ์ฒด ํ๊ธฐ๋ฒ์ ๋ฐ๋ฅธ ๊ตฌ์กฐ๋ก ๊ตฌ์ฑ. 1. JSON ๋ฐ์ดํฐ๋ ์ด๋ฆ๊ณผ ๊ฐ์ ์, key : value ํ์์ผ๋ก ๊ตฌ์ฑ, ์ค๊ดํธ({})๋ก ๋๋ฌ์์ ํํ ์ด๋ฌํ JSON ๋ฐ์ดํฐ๋ ๋ฐ์ดํฐ ์ด๋ฆ.. [Swift] ํจ์(Function) - ๊ณ ๊ธ [Contents] ํจ์ Overloading ์ค์ฒฉ ํจ์ ์ข ๋ฃ๋์ง ์๋ ํจ์ (Nonreturning function) ๋ฐํ ๊ฐ์ ๋ฌด์ํ ์ ์๋ ํจ์ ( @discardableResult ์์ฑ ) ์์ผ๋์นด๋ ์๋ณ์ (Omitting Argumetn Labels) ๊ฐ๋ณ ๋งค๊ฐ๋ณ์ (Variadic Parameters) ํจ์ ํ์ (Function Types) ๐ ํจ์ Overloading ๋จผ์ ์ค๋ฒ๋ก๋ฉ์ด๋ ๊ฐ์ ์ด๋ฆ์ ํจ์๋ฅผ ์ฌ๋ฌ ๊ฐ ์ ์ํ๊ณ ๋งค๊ฐ๋ณ์๋ฅผ ๋ค๋ฅด๊ฒ ํ์ฌ ๋ค์ํ ์ ํ์ ํธ์ถ์ ์๋ต ๊ฐ๋ฅํ๊ฒ ํ๋ค. ๋งค๊ฐ๋ณ์์ ํ์ ์ด ๋ค๋ฅด๊ฑฐ๋ ๋งค๊ฐ๋ณ์์ ๊ฐ์๊ฐ ๋ค๋ฅด๋ค๋ฉด ์ด๋ฆ์ด ๊ฐ์ ํจ์๋ฅผ ์ฌ๋ฌ ๊ฐ ๋ง๋ค ์ ์๋ค. func hello(name: Int){ } func hello(name: String){ } func.. [Error, Xcode] Missing package product <package name> [์๋ฌ๋ด์ฉ] Missing package product 'SnapKit' Missing package product [ํด๊ฒฐ๋ฒ1] File > Swift Packages > Reset Package Caches [ํด๊ฒฐ๋ฒ1] File > Swift Packages > Update to Latest Package Versions https://stackoverflow.com/questions/60952549/xcode-11-4-compile-error-missing-package-product-package-name Xcode 11.4 compile error 'Missing package product ' When I integrate a local package in my Xcode project ever.. [Swift] ํจ์(Function) - ๊ธฐ๋ณธ โ๏ธ ํจ์์ ์ ์ ์ ํ ๊ฐ๋ฐ๋ฌธ์์ ๋ฐ๋ฅด๋ฉด Swift์์ ํจ์๋ ๋ค์๊ณผ ๊ฐ์ด ์ ์๋๋ค. [Definition] Functions are self-contained chunks of code that perform a specific task. You give a function a name that identifies what it does, and this name is used to “call” the function to perform its task when needed. ํจ์(Functions)๋ ํน์ ์์ ์ ์ํํ๋ ์์ฒด์ ์ผ๋ก ํฌํจ๋(self-contained) ์ฝ๋ ๋ฉ์ด๋ฆฌ(chunks) ์ด๋ค. ํจ์๊ฐ ๋ฌด์์ ํ๋์ง ์๋ณ๊ฐ๋ฅํ ์ด๋ฆ์ ์ฃผ๊ณ , ์ด๋ฌํ ์ด๋ฆ์ ํ์ํ ๋ ์์ ์ ์ํํ๊ธฐ ์ํด ํธ์ถ(ca.. [Swift] ์ค์ํํธ ๋ฐ๋ณต๋ฌธ(Loops, Repetitive Statement) ์ค์ํํธ ๋ฐ๋ณต๋ฌธ(Loops, Repetitive Statement) for๋ฌธ while๋ฌธ ๐ for๋ฌธ ์ผ์ ํ์ ๋์ ๋ฐ๋ณตํด์ผ ํ๋ ๊ฒฝ์ฐ ์ฌ์ฉ ๋ฒ์ ์ฐ์ฐ์๋ a...b ๋๋ a.. 1 { integers.removeLast() print(integers) } [์๋ฌธ- while๋ฌธ์ผ๋ก 1๋ถํฐ 10๊น์ง์ ์๋ฅผ ์ถ๋ ฅํ๊ธฐ] var x = 1 while x 0 [Error, Xcode] ํฐ ๋น๋ ์๋ฌ - Unable to install "์ฑ์ด๋ฆ" ํด๊ฒฐ ๋ฐฉ๋ฒ ํฐ์ผ๋ก ๋น๋ ์ ๋ฐ์ํ ์๋ฌ ^^ ์์ธ์ด ๋ช ํํ๊ฒ ์๋์์ ๋ฉฐ์น ๊ฑธ๋ ค์ ํด๊ฒฐ,,,;; ๋ณดํต ํ๋ ์์ํฌ ์ชฝ์ธ ๋ฏ ๋์ ๊ฒฝ์ฐ์๋ embed ํ๋ฉด ์ ๋๋ ํ๋ ์์ํฌ๋ฅผ embed ํด์ ๋ฌ์๋ค. Build Phases์์ embed Frameworks์์ ์ญ์ ํด์ฃผ๋ ์ ์์๋!!! ์คํ์ค๋ฒ ํ๋ก์ฐ ํฌํจํด์ ํด๋ดค๋ ํด๊ฒฐ ๋ฐฉ๋ฒ๋ค์ ๋์ดํด ๋ณด์๋ค... ์๋๋ฉด ์ฐจ๋ก๋๋ก ๋ค ํด๋ณด๊ธธ!! [๐ฑ์๋ฌ ๋ด์ฉ] Unable to install "์ฑ ์ด๋ฆ" [ํ๊ฒฝ] Xcode: 13.2.1 Mac: 12.2.1 iPhone: 15.3.1 Details: Unable to install "SwiftSampleLY_embed" Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620375 .. [Swift] ์ค์ํํธ ์กฐ๊ฑด๋ฌธ(Conditional Statements) ์ค์ํํธ ์กฐ๊ฑด๋ฌธ(Conditional Statements) if๋ฌธ switch๋ฌธ ๐ if๋ฌธ if ๋จ๋ ์ ์ผ๋ก ์ฌ์ฉํด๋ ๋๊ณ , else if, else์ ์กฐํฉํด์ ์ฌ์ฉ. if ๋ค์ ์กฐ๊ฑด ๊ฐ์๋ Bool ํ์ ์ ๊ฐ๋ง ์์นํด์ผ ํ๋ฉฐ, ์กฐ๊ฑด ๊ฐ์ ๊ฐ์ธ๋ ์๊ดํธ๋ ์ ํ์ฌํญ. [๊ธฐ๋ณธ ํํ] if ์กฐ๊ฑด { /* ์คํ ๊ตฌ๋ฌธ */ } else if ์กฐ๊ฑด { /* ์คํ ๊ตฌ๋ฌธ */ } else { /* ์คํ ๊ตฌ๋ฌธ */ } let myAge = 20 if myAge 50 { print("50 ์ด๊ณผ") } else {// ๊ฐ๋ฐ์์ ์๋์ ๋ฐ๋ผ else๋ฌธ๋ ์๋ต ๊ฐ๋ฅ print("50") } ์ค์ํํธ์ ์กฐ๊ฑด์๋ ํญ์ Bool ํ์ ์ด ๋ค์ด์์ผ ํ๋ค. ์ค์.. ์ด์ 1 2 3 4 5 6 7 8 ยทยทยท 12 ๋ค์