diff --git a/PyeonHaeng-iOS.xcodeproj/project.pbxproj b/PyeonHaeng-iOS.xcodeproj/project.pbxproj
index 5ed558e..e32c4d6 100644
--- a/PyeonHaeng-iOS.xcodeproj/project.pbxproj
+++ b/PyeonHaeng-iOS.xcodeproj/project.pbxproj
@@ -36,6 +36,8 @@
BA4FB9C52BA1BC5B00ED03C4 /* NoticeAPI in Frameworks */ = {isa = PBXBuildFile; productRef = BA4FB9C42BA1BC5B00ED03C4 /* NoticeAPI */; };
BA4FB9C72BA1BC5B00ED03C4 /* NoticeAPISupport in Frameworks */ = {isa = PBXBuildFile; productRef = BA4FB9C62BA1BC5B00ED03C4 /* NoticeAPISupport */; };
BA73DDC42BC17912009EE718 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = BA73DDC32BC17912009EE718 /* GoogleService-Info.plist */; };
+ BA73DDC72BC179F6009EE718 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = BA73DDC62BC179F6009EE718 /* FirebaseAnalytics */; };
+ BA73DDCB2BC179F6009EE718 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = BA73DDCA2BC179F6009EE718 /* FirebaseCrashlytics */; };
BA849A342B8F4F36004495BF /* ProductConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA8E83232B8EF83B00FE968C /* ProductConfiguration.swift */; };
BA849A372B8F4FC0004495BF /* MockPaginatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA849A362B8F4FC0004495BF /* MockPaginatable.swift */; };
BA8E83242B8EF83B00FE968C /* ProductConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA8E83232B8EF83B00FE968C /* ProductConfiguration.swift */; };
@@ -187,9 +189,11 @@
BAB6212E2BB13CD100877FC3 /* NetworkAPIKit in Frameworks */,
BA0623D82B68E51400A0A3B2 /* Log in Frameworks */,
BA0564092B6248EA003D6DC7 /* HomeAPI in Frameworks */,
+ BA73DDC72BC179F6009EE718 /* FirebaseAnalytics in Frameworks */,
BAE5ADB02BAD61D000176ADE /* CreditsAPI in Frameworks */,
BAB569612B639F3000D1E0F9 /* DesignSystem in Frameworks */,
BAE5EDB42BB1450100FC4B78 /* NetworkMonitor in Frameworks */,
+ BA73DDCB2BC179F6009EE718 /* FirebaseCrashlytics in Frameworks */,
E55DD5182B9370D100AA63C0 /* SearchAPI in Frameworks */,
E55DD51A2B9370D100AA63C0 /* SearchAPISupport in Frameworks */,
);
@@ -563,6 +567,8 @@
BAE5ADB12BAD61D000176ADE /* CreditsAPISupport */,
BAB6212D2BB13CD100877FC3 /* NetworkAPIKit */,
BAE5EDB32BB1450100FC4B78 /* NetworkMonitor */,
+ BA73DDC62BC179F6009EE718 /* FirebaseAnalytics */,
+ BA73DDCA2BC179F6009EE718 /* FirebaseCrashlytics */,
);
productName = "PyeonHaeng-iOS";
productReference = BAA4D9A92B5A1795005999F8 /* PyeonHaeng-iOS.app */;
@@ -621,6 +627,9 @@
ja,
);
mainGroup = BAA4D9A02B5A1795005999F8;
+ packageReferences = (
+ BA73DDC52BC179F6009EE718 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
+ );
productRefGroup = BAA4D9AA2B5A1795005999F8 /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -1271,6 +1280,17 @@
};
/* End XCConfigurationList section */
+/* Begin XCRemoteSwiftPackageReference section */
+ BA73DDC52BC179F6009EE718 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 10.23.1;
+ };
+ };
+/* End XCRemoteSwiftPackageReference section */
+
/* Begin XCSwiftPackageProductDependency section */
BA0564082B6248EA003D6DC7 /* HomeAPI */ = {
isa = XCSwiftPackageProductDependency;
@@ -1296,6 +1316,16 @@
isa = XCSwiftPackageProductDependency;
productName = NoticeAPISupport;
};
+ BA73DDC62BC179F6009EE718 /* FirebaseAnalytics */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = BA73DDC52BC179F6009EE718 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ productName = FirebaseAnalytics;
+ };
+ BA73DDCA2BC179F6009EE718 /* FirebaseCrashlytics */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = BA73DDC52BC179F6009EE718 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
+ productName = FirebaseCrashlytics;
+ };
BAB569602B639F3000D1E0F9 /* DesignSystem */ = {
isa = XCSwiftPackageProductDependency;
productName = DesignSystem;
diff --git a/PyeonHaeng-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/PyeonHaeng-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
new file mode 100644
index 0000000..8bee099
--- /dev/null
+++ b/PyeonHaeng-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,122 @@
+{
+ "pins" : [
+ {
+ "identity" : "abseil-cpp-binary",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/abseil-cpp-binary.git",
+ "state" : {
+ "revision" : "748c7837511d0e6a507737353af268484e1745e2",
+ "version" : "1.2024011601.1"
+ }
+ },
+ {
+ "identity" : "app-check",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/app-check.git",
+ "state" : {
+ "revision" : "c218c2054299b15ae577e818bbba16084d3eabe6",
+ "version" : "10.18.2"
+ }
+ },
+ {
+ "identity" : "firebase-ios-sdk",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/firebase/firebase-ios-sdk",
+ "state" : {
+ "revision" : "888f0b6026e2441a69e3ee2ad5293c7a92031e62",
+ "version" : "10.23.1"
+ }
+ },
+ {
+ "identity" : "googleappmeasurement",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/GoogleAppMeasurement.git",
+ "state" : {
+ "revision" : "c7a5917ebe48d69f421aadf154ef3969c8b7f12d",
+ "version" : "10.23.1"
+ }
+ },
+ {
+ "identity" : "googledatatransport",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/GoogleDataTransport.git",
+ "state" : {
+ "revision" : "a637d318ae7ae246b02d7305121275bc75ed5565",
+ "version" : "9.4.0"
+ }
+ },
+ {
+ "identity" : "googleutilities",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/GoogleUtilities.git",
+ "state" : {
+ "revision" : "26c898aed8bed13b8a63057ee26500abbbcb8d55",
+ "version" : "7.13.1"
+ }
+ },
+ {
+ "identity" : "grpc-binary",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/grpc-binary.git",
+ "state" : {
+ "revision" : "e9fad491d0673bdda7063a0341fb6b47a30c5359",
+ "version" : "1.62.2"
+ }
+ },
+ {
+ "identity" : "gtm-session-fetcher",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/gtm-session-fetcher.git",
+ "state" : {
+ "revision" : "9534039303015a84837090d20fa21cae6e5eadb6",
+ "version" : "3.3.2"
+ }
+ },
+ {
+ "identity" : "interop-ios-for-google-sdks",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/interop-ios-for-google-sdks.git",
+ "state" : {
+ "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
+ "version" : "100.0.0"
+ }
+ },
+ {
+ "identity" : "leveldb",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/firebase/leveldb.git",
+ "state" : {
+ "revision" : "43aaef65e0c665daadf848761d560e446d350d3d",
+ "version" : "1.22.4"
+ }
+ },
+ {
+ "identity" : "nanopb",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/firebase/nanopb.git",
+ "state" : {
+ "revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
+ "version" : "2.30910.0"
+ }
+ },
+ {
+ "identity" : "promises",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/google/promises.git",
+ "state" : {
+ "revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
+ "version" : "2.4.0"
+ }
+ },
+ {
+ "identity" : "swift-protobuf",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-protobuf.git",
+ "state" : {
+ "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb",
+ "version" : "1.26.0"
+ }
+ }
+ ],
+ "version" : 2
+}
diff --git a/PyeonHaeng-iOS.xcodeproj/xcshareddata/xcschemes/PyeonHaeng-iOS.xcscheme b/PyeonHaeng-iOS.xcodeproj/xcshareddata/xcschemes/PyeonHaeng-iOS.xcscheme
index 54d05ed..ce61faf 100644
--- a/PyeonHaeng-iOS.xcodeproj/xcshareddata/xcschemes/PyeonHaeng-iOS.xcscheme
+++ b/PyeonHaeng-iOS.xcodeproj/xcshareddata/xcschemes/PyeonHaeng-iOS.xcscheme
@@ -62,6 +62,12 @@
ReferencedContainer = "container:PyeonHaeng-iOS.xcodeproj">
+
+
+
+
diff --git a/PyeonHaeng-iOS/Sources/PyeonHaengApp.swift b/PyeonHaeng-iOS/Sources/PyeonHaengApp.swift
index 4b30574..fe63b57 100644
--- a/PyeonHaeng-iOS/Sources/PyeonHaengApp.swift
+++ b/PyeonHaeng-iOS/Sources/PyeonHaengApp.swift
@@ -6,6 +6,7 @@
//
import DesignSystem
+import FirebaseCore
import NetworkMonitor
import SwiftUI
@@ -17,6 +18,7 @@ struct PyeonHaengApp: App {
init() {
FontRegistrar.registerFonts() // 앱을 실행하기 전에 폰트를 로드합니다.
setupNavigationBarAppearance()
+ FirebaseApp.configure()
}
var body: some Scene {
diff --git a/PyeonHaeng-iOS/Sources/Scenes/HomeScene/BottomSheet/ConvenienceSelectBottomSheetView.swift b/PyeonHaeng-iOS/Sources/Scenes/HomeScene/BottomSheet/ConvenienceSelectBottomSheetView.swift
index a86c3b2..4f72708 100644
--- a/PyeonHaeng-iOS/Sources/Scenes/HomeScene/BottomSheet/ConvenienceSelectBottomSheetView.swift
+++ b/PyeonHaeng-iOS/Sources/Scenes/HomeScene/BottomSheet/ConvenienceSelectBottomSheetView.swift
@@ -7,6 +7,7 @@
import DesignSystem
import Entity
+import FirebaseAnalytics
import SwiftUI
// MARK: - ConvenienceSelectBottomSheetView
@@ -24,6 +25,7 @@ struct ConvenienceSelectBottomSheetView: View where ViewModel: HomeVi
ForEach(ConvenienceStore.allCases, id: \.self) { store in
Button {
+ Analytics.logEvent("change_conveniencestore", parameters: ["promotion": store.rawValue])
viewModel.trigger(.changeConvenienceStore(store))
dismiss()
} label: {
diff --git a/PyeonHaeng-iOS/Sources/Scenes/HomeScene/BottomSheet/PromotionSelectBottomSheetView.swift b/PyeonHaeng-iOS/Sources/Scenes/HomeScene/BottomSheet/PromotionSelectBottomSheetView.swift
index 5e7785b..84d58d1 100644
--- a/PyeonHaeng-iOS/Sources/Scenes/HomeScene/BottomSheet/PromotionSelectBottomSheetView.swift
+++ b/PyeonHaeng-iOS/Sources/Scenes/HomeScene/BottomSheet/PromotionSelectBottomSheetView.swift
@@ -7,6 +7,7 @@
import DesignSystem
import Entity
+import FirebaseAnalytics
import SwiftUI
// MARK: - PromotionSelectBottomSheetView
@@ -41,6 +42,7 @@ struct PromotionSelectBottomSheetView: View where ViewModel: HomeView
private var promotionButtons: some View {
ForEach(Promotion.allCases, id: \.self) { promotion in
Button {
+ Analytics.logEvent("change_promotion", parameters: ["promotion": promotion.rawValue])
viewModel.changePromotion(to: promotion)
dismiss()
} label: {
diff --git a/PyeonHaeng-iOS/Sources/Scenes/HomeScene/View/HomeView.swift b/PyeonHaeng-iOS/Sources/Scenes/HomeScene/View/HomeView.swift
index 9745069..26bf417 100644
--- a/PyeonHaeng-iOS/Sources/Scenes/HomeScene/View/HomeView.swift
+++ b/PyeonHaeng-iOS/Sources/Scenes/HomeScene/View/HomeView.swift
@@ -6,6 +6,7 @@
//
import DesignSystem
+import FirebaseAnalytics
import SwiftUI
// MARK: - HomeView
@@ -76,6 +77,7 @@ struct HomeView: View where ViewModel: HomeViewModelRepresentable {
}
}
}
+ .analyticsScreen(name: "main_countent", class: "\(Self.self)")
.tint(.accent)
.fullScreenCover(isPresented: $isOnboardingSheetOpen) {
OnboardingView()
diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductInfoScene/ProductInfoView.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductInfoScene/ProductInfoView.swift
index 5800fdb..b3acd10 100644
--- a/PyeonHaeng-iOS/Sources/Scenes/ProductInfoScene/ProductInfoView.swift
+++ b/PyeonHaeng-iOS/Sources/Scenes/ProductInfoScene/ProductInfoView.swift
@@ -6,6 +6,7 @@
//
import DesignSystem
+import FirebaseAnalytics
import SwiftUI
// MARK: - ProductInfoView
@@ -37,5 +38,10 @@ struct ProductInfoView: View where ViewModel: ProductInfoViewModelRep
.onAppear {
viewModel.trigger(.fetchProduct)
}
+ .analyticsScreen(
+ name: "product_info_content",
+ class: "\(Self.self)",
+ extraParameters: ["product": viewModel.state.product.name]
+ )
}
}
diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift
index f44e1dc..477e334 100644
--- a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift
+++ b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift
@@ -7,6 +7,7 @@
import DesignSystem
import Entity
+import FirebaseAnalytics
import SwiftUI
// MARK: - SearchView
@@ -79,6 +80,7 @@ struct SearchView: View where ViewModel: SearchViewModelRepresentable
}
}
}
+ .analyticsScreen(name: "search_content", class: "\(Self.self)")
.toolbar {
ToolbarItem(placement: .principal) {
SearchTextField(text: $text)
@@ -111,7 +113,10 @@ private struct SearchTextField: View where ViewModel: SearchViewModel
lineWidth: Metrics.textFieldBorderWidth
)
}
- .onSubmit { viewModel.trigger(.textChanged(text)) }
+ .onSubmit {
+ Analytics.logEvent("search_product", parameters: ["product": text])
+ viewModel.trigger(.textChanged(text))
+ }
if !text.isEmpty {
Button {
text = ""
diff --git a/PyeonHaeng-iOS/Sources/Scenes/SettingsScene/SettingsView.swift b/PyeonHaeng-iOS/Sources/Scenes/SettingsScene/SettingsView.swift
index 7f2d17a..3acbac6 100644
--- a/PyeonHaeng-iOS/Sources/Scenes/SettingsScene/SettingsView.swift
+++ b/PyeonHaeng-iOS/Sources/Scenes/SettingsScene/SettingsView.swift
@@ -6,6 +6,7 @@
//
import DesignSystem
+import FirebaseAnalytics
import SwiftUI
// MARK: - SettingsItem
@@ -35,6 +36,7 @@ struct SettingsView: View {
.scrollDisabled(true)
.navigationTitle("설정")
.navigationBarTitleDisplayMode(.inline)
+ .analyticsScreen(name: "settings_content", class: "\(Self.self)")
}
}