File tree Expand file tree Collapse file tree
Projects/App/Sources/AppDelegate Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66//
77
88import SwiftUI
9+ import UIKit
910
1011import ComposableArchitecture
1112import Firebase
1213import FirebaseMessaging
1314import GoogleSignIn
15+ import Dependencies
1416
1517final class AppDelegate : NSObject {
18+ @Dependency ( \. amplitude)
19+ private var amplitude
20+
1621 let store = Store ( initialState: AppDelegateFeature . State ( ) ) {
1722 AppDelegateFeature ( )
1823 }
1924}
2025//MARK: - UIApplicationDelegate
2126extension AppDelegate : UIApplicationDelegate {
27+
2228 func application( _ app: UIApplication , open url: URL , options: [ UIApplication . OpenURLOptionsKey : Any ] = [ : ] ) -> Bool {
2329 if GIDSignIn . sharedInstance. handle ( url) { return true }
2430 return false
@@ -30,6 +36,14 @@ extension AppDelegate: UIApplicationDelegate {
3036 didFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? = nil
3137 ) -> Bool {
3238 self . store. send ( . didFinishLaunching)
39+
40+ // 운영체제 버전 (ex: "iOS 18.0.0")
41+ let osVersion = " iOS \( UIDevice . current. systemVersion) "
42+
43+ // 앱 번들 버전 (ex: "2.0.1")
44+ let appVersion = Bundle . main. infoDictionary ? [ " CFBundleShortVersionString " ] as? String ?? " "
45+
46+ amplitude. track ( . app_open( deviceOS: osVersion, appVersion: appVersion) )
3347 return true
3448 }
3549
You can’t perform that action at this time.
0 commit comments