๐Ÿ‘ฉ๐Ÿป‍๐Ÿ’ป iOSun
article thumbnail
์ˆ˜๋™์œผ๋กœ ํ”„๋กœ๋น„์ €๋‹ ํ”„๋กœํŒŒ์ผ ๊ด€๋ฆฌ, extension ์—๋Ÿฌ ํ•ด๊ฒฐ
iOS 2024. 10. 22. 17:58

๊ทธ๋™์•ˆ ํ•ด์™”๋˜ ์‚ฌ์ด๋“œ ํ”„๋กœ์ ํŠธ์™€ ๋‹ค๋ฅด๊ฒŒ ํšŒ์‚ฌ ์•ฑ์€ ์‚ฌ์ด๋‹ ๊ด€๋ฆฌ๋ฅผ ๋ชจ๋‘ ์ˆ˜๋™์œผ๋กœ ํ•˜๊ณ  ์žˆ์—ˆ๋‹ค.(app target - signing&capabilities ์—์„œ Automatically manage signing์„ offํ•ด๋†“๊ณ  ์žˆ์Œ)  app target์€ ์ˆ˜๋™์œผ๋กœ ์„ค์ •์„ ๊ณ ์ •ํ•ด ๋†“๊ณ  Notification Extenion์„ ์ถ”๊ฐ€ ํ›„ Automatically manage signing์„ on ํ•ด๋†จ์ง€๋งŒ ์•„์นด์ด๋น™ ๊ณผ์ •์—์„œ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค. ์—๋Ÿฌ ๋ฉ”์„ธ์ง€Automatic signing cannot register bundle identifier "์•ฑ ๋ฒˆ๋“ค".Automatic signing cannot register bundle identifiers with Apple. Register your bundle iden..

article thumbnail
[ARC] CFGetRetainCount ํ•จ์ˆ˜๋กœ ์ฐธ์กฐ ํšŸ์ˆ˜ ์„ธ๋ณด๊ธฐ
iOS 2024. 2. 8. 19:11

swift์—์„  ์ฐธ์กฐ ํšŸ์ˆ˜๋ฅผ ์„ธ๋Š” ARC๋กœ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค. ์ฐธ์กฐ ํšŸ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•˜๋Š” ๋ฒ•์€ ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑ or ๊ธฐ์กด ์ธ์Šคํ„ด์Šค๋ฅผ ๋‹ค๋ฅธ ๋ณ€์ˆ˜์— ๋Œ€์ž…ํ•  ๋•Œ +1 ์ธ์Šคํ„ด์Šค๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋˜ ๋ณ€์ˆ˜๊ฐ€ ํ•ด์ œ๋  ๋•Œ or nil์ด ๋  ๋•Œ -1 ๊ทธ๋ฆฌ๊ณ  0์ด ๋˜์—ˆ์„ ๋•Œ, ๋ฉ”๋ชจ๋ฆฌ์—์„œ ์ž๋™์œผ๋กœ ํ•ด์ œ๊ฐ€ ๋œ๋‹ค. ์ด๋ก ์ ์œผ๋ก  ์ด๋ ‡๊ณ ,, ์‹ค์ œ๋กœ CFGetRetainCount ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋ฉฐ ์ฐธ์กฐ ํšŸ์ˆ˜๋ฅผ ์„ธ์–ด๋ณด์ž. RC +1์ด ๋˜๋Š” ๊ฒฝ์šฐ class EmptyClass { } let myClass = EmptyClass() // RC +1 let myClass2 = myClass // RC +1 let myClass3 = myClass // RC +1 print(CFGetRetainCount(myClass)) // 4 print(CFGetRetai..

article thumbnail
[iOS] ์ฝ”๋“œ ๋ฒ ์ด์Šค๋กœ ํ”„๋กœ์ ํŠธ ์„ธํŒ…ํ•˜๊ธฐ
iOS 2024. 1. 21. 18:34

ํ”„๋กœ์ ํŠธ ์„ธํŒ…ํ•  ๋•Œ๋งˆ๋‹ค ์ฐพ์•„๋ด์„œ ์ด๋ฒˆ ๊ธฐํšŒ์— ์ •๋ฆฌํ•˜๋ ค ํ•œ๋‹ค. 1. Main ์Šคํ† ๋ฆฌ๋ณด๋“œ ์‚ญ์ œ 2. Project target - Build Settings - main๊ฒ€์ƒ‰ - UiKit Main Storybard File base Name ์‚ญ์ œ 3. info.plist - storybard Name ์‚ญ์ œ 4. SceneDelegate ์ˆ˜์ • func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } window = UIWindow(..

article thumbnail
[SwiftUI] Custom TabView ๊ตฌํ˜„
iOS 2023. 6. 16. 14:12

SwiftUI๋กœ ํ”„๋กœ์ ํŠธ ์ž‘์—…์„ ํ•˜๋ฉด์„œ TabView๋ฅผ ํ†ตํ•ด ํƒญ๋ฐ”๋ฅผ ๊ตฌํ˜„ํ–ˆ๋‹ค. TabView๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ฝ”๋“œ๊ฐ€ ๋งค์šฐ ๊ฐ„๋‹จํ•˜์ง€๋งŒ.. ์ปค์Šคํ…€์—์„œ ์œ ์—ฐํ•˜์ง€ ๋ชปํ–ˆ๋‹ค. ํƒญ๋ฐ” ๋ฐฐ๊ฒฝ์ƒ‰ ๋ณ€๊ฒฝ (ํฐ์ƒ‰์œผ๋กœ), ์Šคํฌ๋กค ํ•  ๋•Œ ํˆฌ๋ช…๋„ ์—†์• ๊ธฐ ํƒญ๋ฐ” ๋†’์ด ๋ณ€๊ฒฝ ํƒญ๋ฐ” ๊ธ€์”จ์ฒด ๋ณ€๊ฒฝ ์„ ํ•ด์•ผํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— CustomTabView๋ฅผ ๋งŒ๋“ค์—ˆ๋‹ค. CustomTabView.swift import SwiftUI enum Tab { case calendar case feed } struct CustomTabView: View { @Binding var selectedTab: Tab var body: some View { HStack(alignment: .center) { Button { selectedTab = .calendar } label: ..

profile on loading

Loading...