일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- Session
- MacOS
- appstore
- SwiftUI
- Code
- stack
- Apple
- JPA
- 한글
- Python
- github
- rxswift
- view
- Firebase
- Notification
- error
- UIButton
- Archive
- IOS
- String
- mac
- FLUTTER
- Git
- 웹뷰
- 개발자
- Xcode
- darkmode
- Realm
- iOS16
- Swift
- Today
- Total
목록Swift (173)
EEYatHo 앱 깎는 이야기
에러 상황XcodeCloud 빌드시 에러 발생Log에 나와있는 에러 문구xcodebuild: error: Could not resolve package dependencies:Package.resolved file is corrupted or malformed; fix or delete the file to continue: unknown 'PinsStorage' version '3' at '/Volumes/workspace/repository/ToyProject.xcworkspace/xcshareddata/swiftpm/Package.resolved'. 해결 방법XcodeCloud 환경의 Xcode 버전을 15.1 -> 15.3 으로 변경하여 해결
4개 파일로 간단히 구현.UIKit의 ViewController로 QR기능을 구현 한 뒤, SwiftUI로 변경하는 예시코드들. ContentViewimport SwiftUIstruct ContentView: View { @State private var uriFromQR: String = "" var body: some View { ZStack { // QR Scanner QRCameraView(uriFromQR: $uriFromQR) VStack { Spacer() // Scan 한 값을 보여주는 T..
App Product 경로/Users/{유저이름}/Library/Developer/Xcode/DerivedData/{프로젝트키값}/Build/Products/Debug-iphonesimulatorProduct : dynamicStaticToy당시 Project들 : dynamicStaticToy, SubModule1, 2, 3 App 실행파일, Embed Frameworks 경로Product 우클릭 후 Show Package Contents 하면 실행파일이 나옴Frameworks 폴더에 동적 Embed한 프레임워크들이 들어감
tuist 4.x 로 마이그레이션 중 에러 발생 The 'swift' command exited with error code 1 and message: error: the Swift tools version specification is missing a label; consider inserting 'swift-tools-version:' between the comment marker and the version specifier 해결방법 소스파일 맨 위에 swift-tools-version 의 버전을 명시 // swift-tools-version:5.9
DeepLink앱이 실행되거나 앱 내 특정 페이지에 도달할 수 있도록 하는 링크두가지 방식이 존재. ( URL Scheme, Universal Link ) <h3 data-..
SwiftUI 에는 뷰의 생명주기로 onAppear과 onDisappear만 제공한다. 나는 deinit을 감지하고 싶다.. 하지만 Struct는 deinit을 오버라이드 할 수 없는걸? class의 도움을 받는다. DeinitDetector /// 구조체의 deinit을 확인하기위한 class final class DeinitDetector { deinit { var typeString = "\(type(of: T.self))" /// "SomeView.Type" typeString.removeLast(5) /// "SomeView" print("🖐🖐🖐 \(typeString): \(#function)") /// "🖐🖐🖐 NotificationView: deinit" deinitCompletion?()..
TCA의 단점 WebSocket 을 구현하는 등, Stream을 받아와서 구독하고, 지속적으로 이벤트를 수신해야할 때 RetainCycle 이 무조건 발생한다. 즉, view의 사이클에 맞춰서 명시적으로 구독을 해제해줘야 한다. 이유 Action을 발생할 수 있는 엔드포인트를 .run을 통해 받아오고, Stream의 실행부에, 엔드포인트를 넣기 때문에 RetainCycle이 발생한다. ( 스트림실행부 -> 엔드포인트 -> 리듀서 -> 스트림 -> 스트림실행부 ) ( Class의 weak가 그립다.. ) 결과 때문에, view의 사이클에 맞춰서 명시적으로 구독을 해제해줘야, reducer도 잘 해제된다. ( onAppear, onDisappear 을 활용. ) ( 만약 init, deinit 으로 하고싶다..
개요 UIKit 에 RxBus 를 사용하던 프로젝트를, SwiftUI + TCA 로 컨버팅하면서 발생한 일. SwiftUI.View 가 struct 라 내부 closure 에 weak self 를 사용할 수 없음. TCA 의 reducer 도 struct 로 제공 중. 기 사용중이던 RxBus 는 Rx를 통해 전역 이벤트를 수신해야함. 해당 과정에서 weak를 사용하지 못하기에, self 를 강한참조하여 메모리 릭 발생.. 해결 과정 & Solution SwiftUI(struct) 에서, 비동기 First Party인 NotificationCenter를 어떻게 사용하는지 탐구. -> Combine을 사용하여 수신하는 것을 발견. -> RxBus 이벤트를 받으면 Combine publisher를 sink하..