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
- Refactoring
- tableView
- ribs
- Protocol
- 클린 코드
- 스위프트
- uitableview
- UITextView
- clean architecture
- swift documentation
- Xcode
- Human interface guide
- 애니메이션
- uiscrollview
- collectionview
- 리펙토링
- UICollectionView
- Observable
- 리펙터링
- map
- rxswift
- Clean Code
- ios
- SWIFT
- HIG
- swiftUI
- RxCocoa
- MVVM
- combine
- 리팩토링
Archives
- Today
- Total
김종권의 iOS 앱 개발 알아가기
[iOS - Crashlytics] Firebase Crashlytics 사용방법 본문
Firebase프로젝트 세팅
3번에서 사용 설정 누르면 아래화면처럼 loading
Xcode프로젝트 세팅
- Firebase SDK연동, FirebaseApp.configure()까지 작성: ios-development.tistory.com/230
- 앱에 crashlytics 추가
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
- build phase에서 빌드스크립트 생성 후 작성 (4번: build script 이름 설정)
5번 코드: debug버전에서는 dSYM을 올리지 않으므로 (배포하지 않으므로) debug버전이 아니면 crashlytics를 실행하라는 의미
if [ "${CONFIGURATION}" != "Debug" ]; then
"${PODS_ROOT}/FirebaseCrashlytics/run"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist -p ios ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
fi
dSYM파일로 DWARF 설정
crashlytics가 연동 되었는지 테스트
* 참고: firebase.google.com/docs/crashlytics/test-implementation?authuser=0
- 강제 종료 버튼을 눌러서 프로젝트를 강제종료하는 코드 추가 (아무 화면에다 아래 코드 추가)
// 종료 버튼 생성
let button = UIButton(type: .roundedRect)
button.frame = CGRect(x: 20, y: 50, width: 100, height: 30)
button.setTitle("Crash", for: [])
button.addTarget(self, action: #selector(self.crashButtonTapped(_:)), for: .touchUpInside)
view.addSubview(button)
@IBAction func crashButtonTapped(_ sender: AnyObject) {
fatalError()
}
- 프로젝트에서 build sceme를 alpha로 변경
- 실행 -> 생겨난 crash버튼을 눌러서 강제 종료
- 5분정도 후에 firebase console에서 확인
'iOS 앱 배포와 출시' 카테고리의 다른 글
Comments