Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Git
- appstore
- Xcode
- view
- Swift
- FLUTTER
- rxswift
- Apple
- SwiftUI
- 한글
- iOS16
- Code
- Archive
- Notification
- Python
- window
- MacOS
- stack
- UIButton
- mac
- github
- IOS
- darkmode
- Realm
- 웹뷰
- 개발자
- Session
- JPA
- error
- Firebase
Archives
- Today
- Total
목록DisposeBag (1)
EEYatHo 앱 깎는 이야기
Swift ) weak 를 못쓰게되면서.. (with Rx vs Combine)
개요 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하..
iOS, Swift/Tip, Bug, Swift Error
2023. 8. 22. 00:15