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 |
Tags
- FLUTTER
- Git
- shorebird
- 한글
- appstore
- Firebase
- Swift
- error
- mac
- 개발자
- window
- IOS
- Code
- github
- Apple
- Realm
- Session
- Xcode
- geofencing
- SwiftUI
- 웹뷰
- 맥
- darkmode
- UIButton
- MacOS
- rxswift
- Archive
- iOS16
- 이미지
- JPA
Archives
- Today
- Total
EEYatHo 앱 깎는 이야기
Swift ) com.apple.CoreHaptics Code=-4805 - EEYatHo iOS 본문
iOS, Swift/Tip, Bug, Swift Error
Swift ) com.apple.CoreHaptics Code=-4805 - EEYatHo iOS
EEYatHo 2022. 10. 28. 16:11
HapticEngine 으로 진동을 구현했었다. 구현 포스팅
그런데 백그라운드로 갔다가 포그라운드로 돌아온 후, 진동을 켜면
com.apple.CoreHaptics Code=-4805 에러가 발생했다.
CHHapticError 정의 를 보니, 엔진이 켜져있지 않다고 한다.

Solution
HapticEngine 은 앱이 백그라운드 상태로 가면 꺼진다.
따라서 포그라운드 진입시, HapticEngine 을 다시 start 시켜 해결했다.
/// in AppDelegate
override func applicationWillEnterForeground(_ application: UIApplication) {
do {
try VibrationManager.shared?.hapticEngine.start()
} catch {
print("Fail to hapticEngine Start: \(error)")
}
}
'iOS, Swift > Tip, Bug, Swift Error' 카테고리의 다른 글
| Swift ) 앱 종료 감지, 지연 applicationWillTerminate - EEYatHo iOS (0) | 2023.06.30 |
|---|---|
| Swift ) NSURLErrorDomain Code=-1103 - EEYatHo iOS (0) | 2022.11.10 |
| iOS ) iOS16 present 버그 - EEYatHo iOS (2) | 2022.10.11 |
| iOS ) Archive 후 Appstore Uplaod 시 에러 - EEYatHo iOS (0) | 2022.10.04 |
| Swift ) iOS16 강제 화면 회전 대응 - EEYatHo iOS (0) | 2022.10.04 |
Comments