-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Firebase Crashlytics 모듈 추가 및 내부 이벤트 반영 코드 추가 #727
Changes from 3 commits
1db4cd1
75dc79e
cef185f
160789e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,11 @@ final class FamilyNameSettingViewController: BBNavigationViewController<FamilyNa | |
private let groupEditerView: JoinFamilyGroupEdtiorView = JoinFamilyGroupEdtiorView() | ||
|
||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
BBLogManager.analytics(logType: BBEventAnalyticsLog.viewPage(pageName: .familyGroupNameSetting)) | ||
} | ||
|
||
//MARK: Configures | ||
override func setupUI() { | ||
super.setupUI() | ||
|
@@ -147,6 +152,7 @@ final class FamilyNameSettingViewController: BBNavigationViewController<FamilyNa | |
|
||
groupConfirmButton.rx | ||
.tap | ||
.do { _ in BBLogManager.analytics(logType: BBEventAnalyticsLog.clickFamilyButton(entry: .familyNameSetting))} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 얘네들 viewcontroller에서 do로 받아서 처리하는 것보다 뷰모델에 넣는게 낫지 않을까여?🫨 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ㅇㅎ 화긴염 💯 |
||
.throttle(RxInterval._100milliseconds, scheduler: RxScheduler.main) | ||
.map { Reactor.Action.didTapUpdateFamilyGroupNickname(.update) } | ||
.bind(to: reactor.action) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ public final class PrivacyViewController: BaseViewController<PrivacyViewReactor> | |
//MARK: Configure | ||
public override func setupUI() { | ||
super.setupUI() | ||
BBLogManager.analytics(logType: BBEventAnalyticsLog.viewPage(pageName: .setting)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이거는 왜 뷰디드로드에 안넣구...?!여기에 잇져?! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오우 쉿 테스트 용으로 한거 안지웠나봐용 |
||
view.addSubviews(inquiryBannerView, privacyTableView, privacyIndicatorView) | ||
} | ||
|
||
|
@@ -222,6 +223,7 @@ extension PrivacyViewController { | |
|
||
let confirmAction = UIAlertAction(title: "확인", style: .default) { [weak self]_ in | ||
guard let self else { return } | ||
BBLogManager.analytics(logType: BBEventAnalyticsLog.clickAccountButton(entry: .logout)) | ||
self.reactor?.action.onNext(.didTapLogoutButton) | ||
} | ||
|
||
|
@@ -242,6 +244,7 @@ extension PrivacyViewController { | |
let confirmAction = UIAlertAction(title: "확인", style: .default) { [weak self ]_ in | ||
guard let self else { return } | ||
self.reactor?.action.onNext(.didTapFamilyUserResign) | ||
BBLogManager.analytics(logType: BBEventAnalyticsLog.clickAccountButton(entry: .familyResign)) | ||
} | ||
|
||
[cancelAction, confirmAction].forEach(resignAlertController.addAction(_:)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// BBAnalyticsLogParametable.swift | ||
// Core | ||
// | ||
// Created by 김도현 on 12/19/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol BBAnalyticsLogParametable: RawRepresentable, CustomStringConvertible where RawValue == String { } | ||
|
||
public extension BBAnalyticsLogParametable { | ||
var description: String { | ||
self.rawValue | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// BBAnalyticsLogType.swift | ||
// Core | ||
// | ||
// Created by 김도현 on 12/19/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol BBAnalyticsLogType { | ||
var name: String { get } | ||
var params: [String: Any] { get } | ||
} | ||
|
||
public extension BBAnalyticsLogType { | ||
var name: String { | ||
Mirror(reflecting: self) | ||
.children | ||
.first? | ||
.label? | ||
.toSnakeCase() ?? String(describing: self).toSnakeCase() | ||
} | ||
|
||
var params: [String: Any] { | ||
var dict: [String: Any] = [:] | ||
|
||
let enumMirror = Mirror(reflecting: self) | ||
|
||
guard let associated = enumMirror.children.first else { return dict } | ||
|
||
for enumParams in Mirror(reflecting: associated.value).children { | ||
guard let label = enumParams.label?.toSnakeCase() else { continue } | ||
dict[label] = enumParams.value | ||
} | ||
|
||
return dict | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
얘네는 analytics에 넣는 이유가 몬가요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
생각해 보니깐 에러 발생했는데 analytics로 이벤트 트래킹 처리할 필요는 없을 것 같네요 :)