[UIKit] ์•ฑ์˜ ์ƒ๋ช…์ฃผ๊ธฐ
ยท
๐ŸŽ Dev/UIKit
โœ”๏ธŽ ์ƒ๋ช…์ฃผ๊ธฐ (Life Cycle) ์ƒ๋ช…์ฃผ๊ธฐ๋ž€, ์•ฑ์ด ์ตœ์ดˆ๋กœ ์‹คํ–‰๋˜๋Š” ์‹œ์ ๋ถ€ํ„ฐ ์ข…๋ฃŒ๋˜๋Š” ์‹œ์ ๊นŒ์ง€์˜ ์ƒํƒœ๋ฅผ ์˜๋ฏธํ•œ๋‹ค.๊ทธ๋ ‡๋‹ค๋ฉด ์ด๋Ÿฐ ์•ฑ์˜ ์ƒํƒœ๊ฐ€ ๋ฌด์—‡์ธ๊ฐ€ ํ•˜๋ฉด, "the current state of your app determines what it can and can’t do at any time." ์ฆ‰, ํ˜„์žฌ ์‹œ์ ์—์„œ ์•ฑ์ด ๋ฌด์—‡์„ ํ•  ์ˆ˜ ์žˆ๋Š๋ƒ๋ฅผ ๊ฒฐ์ • ์ง“๋Š” ๊ฒƒ์„ ๋œปํ•œ๋‹ค. ์•ฑ์„ ๊ฐœ๋ฐœ ๋ฐ ์‚ฌ์šฉ์„ ํ•˜๋‹ค๋ณด๋ฉด ์‚ฌ์šฉ์ค‘์ธ ์•ฑ์„ ๋ฐฑ๊ทธ๋ผ์šด๋“œ๋กœ ์ž ์‹œ ๋ณด๋‚ผ ๋•Œ๋„ ์žˆ๊ณ  (์นดํ†ก์œผ๋กœ ๋ฐ›์€ ๊ณ„์ขŒ๋ฒˆํ˜ธ๋ฅผ ๋ณต์‚ฌํ•˜๊ณ , ๊ทธ๋Œ€๋กœ ์€ํ–‰์•ฑ์„ ์ผœ์„œ ๋ถ™์—ฌ๋†“๋Š”๋‹ค๊ฑฐ๋‚˜ ํ•˜๋Š” ์ƒํ™ฉ), ๋ฐฑ๊ทธ๋ผ์šด๋“œ์— ๋‘” ์ฑ„๋กœ ํ•ด๋‹น ์•ฑ์„ ๊ณ„์† ์‚ฌ์šฉํ•  ๋•Œ๋„ ์žˆ๊ณ  (์œ ํŠœ๋ธŒ ๋ฎค์ง์„ ์‚ฌ์šฉ์ค‘์ธ ์ฑ„๋กœ ๋‹ค๋ฅธ ์•ฑ์„ ๋ฉ”์ธ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์„ ์ˆ˜๋„ ์žˆ๊ณ ), ํฌ๊ทธ๋ผ์šด๋“œ ์ƒํƒœ๋กœ ๊ทธ ์•ฑ์„ ์ด์šฉํ•  ..
[SwiftUI] Info.plist
ยท
๐ŸŽ Dev/SwiftUI
SwiftUI๋ฅผ ๋‹ค์‹œ ๊ณต๋ถ€ํ•ด๋ณด๋ ค๊ณ  UIKit์—์„œ ์‚ฌ์šฉํ•˜๋˜ ๊ฒƒ๋“ค์„ ์ด๊ฒƒ์ €๊ฒƒ ์ ์šฉํ•ด๋ณด๋˜ ์ฐจ, ๋ฌด์–ธ๊ฐ€ ์ด์ƒํ•œ ๊ฑธ ์ธ์ง€ํ–ˆ๋‹ค.๋ฐ”๋กœ, info.plist๊ฐ€ ํด๋”์— ์—†๋‹ค๋Š” ๊ฒƒ.     ๐Ÿ“Œ Xcode 13 ์ดํ›„ ํ”„๋กœ์ ํŠธ๋ฅผ ๋‹ค์‹œ ๋งŒ๋“ค์–ด๋ณด๊ณ , ์—ฌ๊ธฐ์ €๊ธฐ ๋ˆŒ๋Ÿฌ๋ด๋„ ๋ณด์ด์ง€ ์•Š์•„์„œ ๊ฒ€์ƒ‰ํ•ด๋ณด์•˜๋Š”๋ฐ Xcode 13 ์ดํ›„ ์• ํ”Œ์ด ์˜๋„์ ์œผ๋กœ info.plist๋ฅผ ์ˆจ๊ฒผ๋‹ค๋Š” ๊ฑธ ์•Œ๊ฒŒ ๋˜์—ˆ๋‹ค. ์•„๋ž˜๋Š” ๊ณต์‹๋ฌธ์„œ์— ๊ธฐ์žฌ๋œ ๊ด€๋ จ ๋‚ด์šฉ์ด๋‹ค. Projects created from several templates no longer require configuration files such as entitlements and Info.plist files. Configure common fields in the target’s Info tab, an..
[Swift] unowned vs weak
ยท
๐ŸŽ Dev/Swift
ํ•ด๋‹น ๊ฒŒ์‹œ๊ธ€์€ iOS ๋ฉด์ ‘์Šคํ„ฐ๋”” SweepSwift์—์„œ ์ง„ํ–‰ํ•œ ์งˆ๋ฌธ ์ค‘ ์ œ๊ฐ€ ๋‹ด๋‹น ํ–ˆ๋˜ ์งˆ๋ฌธ์˜ ๋‹ต๋ณ€ ๋‚ด์šฉ์„ ์ •๋ฆฌ ๋ฐ ๋ณด๊ฐ•ํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค.    ๐Ÿ”ด unowned์™€ weak์˜ ์ฐจ์ด์ ์„ ์„ค๋ช…ํ•˜์„ธ์š”.์บก์ฒ˜ ๋ฆฌ์ŠคํŠธ, ๊ฐ์ฒด๊ฐ„์˜ ์ฐธ์กฐ ๋“ฑ์˜ ๊ฒฝ์šฐ์ธ ๊ฐ•ํ•œ ์ฐธ์กฐ ์ˆœํ™˜(Strong Reference Cycle)๋กœ ์ธํ•œ ๋ฉ”๋ชจ๋ฆฌ ๋ˆ„์ˆ˜๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋˜๋Š” ์ฐธ์กฐ ํƒ€์ž…์ž…๋‹ˆ๋‹ค. ์ฐจ์ด์ ์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.   ๐Ÿ“Œ unowned unwoned๋ฅผ ์ฐธ์กฐํ•˜๋Š” ๊ฒฝ์šฐ ๊ฐ’(value)์ด ํ•ญ์ƒ ์กด์žฌํ•œ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ํ• ๋‹นํ•ด์ œ๋ฅผ ํ•ด๋„ ์ธ์Šคํ„ด์Šค๊ฐ€ ๋ฉ”๋ชจ๋ฆฌ์—์„œ ํ•ด์ œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.unowned๋Š” ๊ฐ’์— ๋ฐ”๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋Œ€์‹  unowned ์ฐธ์กฐ๋Š” ํ• ๋‹นํ•ด์ œ๊ฐ€ ๋œ ์ƒํƒœ์ผ ๋•Œ nil๋กœ ์„ค์ •๋˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— (์ฆ‰, ๊ฐ์ฒด๊ฐ€ ARC์— ์˜ํ•ด ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ ํ•ด..
[Error] Library not loaded: @rpath no such file
ยท
๐ŸŽ Dev/Issue
โš™๏ธ Setting - iOS 17 ↑ - Swift vesrion 5.9 - Xcode version 15 ๐Ÿ’ป Trouble - Error Message: "dyld[5106]: library not loaded: @rpath/rxswift.framework/rxswift%0d%0a referenced from: /private/var/containers/bundle/application/______/name.app/name%0d%0a reason: tried: '/users/callieKim/library/developer/xcode/deriveddata/name-hcxwkdmsuvmqppcfqouwjbvafpio/build/products/debug-iphoneos/packageframeworks/..
[Error] Could not get GOOGLE_APP_ID in Google Services file from build environme
ยท
๐ŸŽ Dev/Issue
โš™๏ธ Setting - iOS 17 ↑ - Swift vesrion 5.9 - Xcode version 15 ๐Ÿ’ป Trouble - While testing Firebase Messaging, I encountered an error message stating "Could not get GOOGLE_APP_ID in Google Services file from the build environment." โœ๏ธTrouble Shooting - Checked that the bundle ID matches the one saved in Firebase; confirmed it matched. - Downloaded the GoogleService-Info file multiple times to ensure..
[SwiftUI] VStack vs LazyVStack
ยท
๐ŸŽ Dev/SwiftUI
๐Ÿ“Œ   ViewIn SwiftUI, a view can be likened to a viewController in UIKit. It serves as a fundamental building block for constructing user interfaces, allowing users to define the structure and appearance of their app's content.     ๐Ÿ“Œ   VStackAccording to the official documentation, in SwiftUI, a VStack signifies the vertical arrangement of a view's subviews. It's noteworthy that a VStack renders..