-
Notifications
You must be signed in to change notification settings - Fork 0
[#[599] Firebase Crashlytics를 붙인다 #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ff56368
chore: Firebase Crashlytics 의존성 추가
opficdev c5d771f
docs: 문서 추가
opficdev 90dd771
chore: Firebase Crashlytics 설정 추가
opficdev 0d6d989
feat: Infra 오류 Crashlytics 기록 추가
opficdev 285b69d
chore: Debug dSYM 생성 설정 추가
opficdev b3a4ddb
fix: Debug 빌드 Crashlytics 수집 비활성화
opficdev 0131c87
refactor: Crashlytics 오류 도메인 세분화
opficdev 3eb25f2
fix: Crashlytics 원본 오류 정보 보존
opficdev 7be2468
fix: Crashlytics 수집 정책 설정 개선
opficdev 7a4254c
fix: Debug dSYM 생성 설정 정리
opficdev 8aa81f0
fix: Debug 빌드 dSYM 업로드 스크립트 제거
opficdev abc46ea
chore: CI Homebrew trust 설정 추가
opficdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
Application/DevLogInfra/Sources/Common/FirebaseCrashlyticsHelper.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| // | ||
| // FirebaseCrashlyticsHelper.swift | ||
| // DevLogInfra | ||
| // | ||
| // Created by opfic on 6/16/26. | ||
| // | ||
|
|
||
| import FirebaseCrashlytics | ||
| import Foundation | ||
|
|
||
| enum FirebaseCrashlyticsHelper { | ||
| static func record( | ||
| _ error: Error, | ||
| domain: String, | ||
| code: Int, | ||
| metadata: [String: String] = [:], | ||
| logs: [String] = [] | ||
| ) { | ||
| let nsError = error as NSError | ||
| let report = NSError( | ||
| domain: domain, | ||
| code: code, | ||
| userInfo: userInfo(for: nsError, error: error, metadata: metadata) | ||
| ) | ||
| let crashlytics = Crashlytics.crashlytics() | ||
|
|
||
| logs.forEach { | ||
| crashlytics.log($0) | ||
| } | ||
|
|
||
| crashlytics.record(error: report) | ||
| } | ||
| } | ||
|
|
||
| private extension FirebaseCrashlyticsHelper { | ||
| enum Key: String { | ||
| case underlyingType | ||
| case underlyingDomain | ||
| case underlyingCode | ||
| } | ||
|
|
||
| static func userInfo( | ||
| for nsError: NSError, | ||
| error: Error, | ||
| metadata: [String: String] | ||
| ) -> [String: Any] { | ||
| var userInfo: [String: Any] = [ | ||
| NSUnderlyingErrorKey: nsError, | ||
| Key.underlyingType.rawValue: String(describing: type(of: error)), | ||
| Key.underlyingDomain.rawValue: nsError.domain, | ||
| Key.underlyingCode.rawValue: nsError.code | ||
| ] | ||
|
|
||
| metadata.forEach { | ||
| userInfo[$0.key] = $0.value | ||
| } | ||
|
|
||
| return userInfo | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.