일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- UIButton
- Xcode
- Realm
- 개발자
- 한글
- Code
- Swift
- Firebase
- error
- appstore
- 웹뷰
- darkmode
- shorebird
- Session
- Notification
- SwiftUI
- iOS16
- FLUTTER
- Archive
- Git
- geofencing
- mac
- window
- JPA
- 이미지
- Apple
- IOS
- github
- MacOS
- rxswift
- Today
- Total
목록iOS, Swift/Tip, Bug, Swift Error (33)
EEYatHo 앱 깎는 이야기

Moya 에서 네트워크 통신에 접근할 수 있는 방법 2가지 Interceptor Plugin Interceptor #git RequestInterceptor의 구현체를 MoyaProvider.Session 에 넣기 let insterceptor = MyInterceptor() let session = Session(interceptor: insterceptor) let provider = MoyaProvider(session: session) adapt 로 모든 request 에 접근 retry 로 validation 에 실패한 response 에 접근 /// Type that provides both `RequestAdapter` and `RequestRetrier` functionality. publ..

applicationWillTerminate UIKit > UIApplication.h > applicationWillTerminate 을 가지고 앱 종료 직전을 컨트롤할 수 있음. 해당 메소드가 return 되면, 시스템이 앱을 종료한다. 앱 종료 지연 및 async 작업 applicationWillTerminate 메소드에 sync 코드를 넣으면 다 실행하고 종료되지만, NotificationCenter, API 호출 등의 async 작업은, 미처 실행되기 전에 함수가 종료되서, 동작하지 않는 경우가 발생한다. 이를 방지하기 위해서는 return 을 지연(sleep) 시키면 된다. 문서에 따르면 최대 약 5초까지 지연시킬 수 있다. 코드 /// 해당 함수가 반환되면 시스템이 앱을 즉시 종료. /// ..

에러 배경설명 API 호출시 아래와 같은 에러가 나옴 status code : 1103 NSLocalizedDescription : 리소스가 최대 크기를 초과함 Solution iOS 13 이상에서 나타나는 버그이다. API 호출 시, request 의 httpMethod 를 GET 이라면, httpBody 를 비워야한다... 🫠 body 를 통해 데이터를 전달하고 싶으면, API 가 POST 를 지원하도록 하고 사용한다. GET 을 유지하고 데이터를 전달하고 싶으면, header 나 url query를 사용한다. Reference https://stackoverflow.com/questions/56955595/1103-error-domain-nsurlerrordomain-code-1103-resourc..

HapticEngine 으로 진동을 구현했었다. 구현 포스팅 그런데 백그라운드로 갔다가 포그라운드로 돌아온 후, 진동을 켜면 com.apple.CoreHaptics Code=-4805 에러가 발생했다. CHHapticError 정의 를 보니, 엔진이 켜져있지 않다고 한다. Solution HapticEngine 은 앱이 백그라운드 상태로 가면 꺼진다. 따라서 포그라운드 진입시, HapticEngine 을 다시 start 시켜 해결했다. /// in AppDelegate override func applicationWillEnterForeground(_ application: UIApplication) { do { try VibrationManager.shared?.hapticEngine.start() }..

iOS16 에서 특정 조건을 만족하는 케이스에서 present 시 UI 가 깨진다. 버그 조건 설명 iOS16 디바이스의 orientation 과, 앱에서 인지하는 orientation 이 다른 상황 modalPresentStyle 이 pageSheet 와 formSheet 가 아닌 viewController 를 present 구현 영상 with gif iOS16 시뮬레이터에서, 디바이스의 방향은 potraits, 앱의 방향은 landscape 로 바꾼 뒤, ( 그 반대도 버그가 발생한다. ) modalPresentStyle 을 overFullScreen 으로 present 하는 gif 이다. 앱의 orientation 를 무시하고 디바이스의 orientation 에 맞게 present 되어버린다. ho..

에러 내용 Archive 후, appstore upload를 진행할 때 발생. Asset validation failed Invalid Pre-Release Train. The train version '15.1.1' is closed for new build submissions (ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) Asset validation failed This bundle is invalid. The value for key CFBundleShortVersionString [15.1.1] in the Info.plist file must contain a higher version than that of the previously approved versi..

Scene의 화면회전 제어 로직이 변경되면서, 기존에 사용하던 UIDevice 방식은 deprecated 되었다. // is deprecated let value = UIInterfaceOrientation.landscapeRight.rawValue UIDevice.current.setValue(value, forKey: "orientation") 해당 방식으로 강제 화면 회전시, 친절하게 아래와 같은 에러가 발생한다. ( UIWindowScene.requestGeometryUpdate 를 사용해달라는 말. ) 새로 사용해야 될 함수 : 적용 코드 : /// 화면 가로로 바꾸기 if #available(iOS 16.0, *) { let windowScene = UIApplication.shared.con..

배경 설명 아래처럼, 네비게이션바에 커스텀 뷰를 넣는 식으로 사용하고 있었는데 navigationItem.titleView = myCustomView iOS16 에서 네비게이션바의 UI가 깨졌다. 버튼들이 클릭이 안되고, 가운데로 몰리고, 보이지 않는 경우도 있었다. 가운데로 검색바는 찌그러졌었다. iOS16 에서 UIKit 이 변경된게 무엇인지 발표하는 WWDC 도 살펴보았고, iOS16, navigation Bar 기타 등등.. 여러 구글링을 해도 답이 보이지 않았다. ( 이런거나 계속 나오고 -ㅅ- ) 삽질 끝에 발견한 현상 iOS16 이전에는, titleView 의 부모가 _UINavigationBarContentView 였다. _UINavigationBarContentView 는 titleVie..