Skip to content

Commit

Permalink
#398 [fix]: firebaseanalytics 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeyoung103 committed Feb 19, 2023
1 parent 035c197 commit 8a1e0b5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import UIKit
import SnapKit
import Then
import AuthenticationServices
import Firebase

class LoginViewController: UIViewController {

Expand Down Expand Up @@ -206,6 +207,15 @@ class LoginViewController: UIViewController {
switch result {
case .success(let data):
print("로그: [requestAutoLogin] success")
let event = "autoLoginSuccess"
let parameters = [
"file": "loginviewcontroller",
"function": "requestAutoLogin"
]
Analytics.setUserID("userID = \(12)")
Analytics.setUserProperty("ko", forName: "country")
Analytics.logEvent(event, parameters: parameters)

let data = data as? LoginResultModel
UserDefaults.standard.set(data?.token?.accessToken, forKey: "accessToken")
UserDefaults.standard.set(data?.token?.refreshToken, forKey: "refreshToken")
Expand Down
14 changes: 8 additions & 6 deletions Todoary-iOS/Todoary/SupportingFiles/GoogleService-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
<key>STORAGE_BUCKET</key>
<string>todoary-cec3a.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<false/>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<false/>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<true/>
<key>IS_GCM_ENABLED</key>
<true></true>
<true/>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<true/>
<key>GOOGLE_APP_ID</key>
<string>1:635795718795:ios:76286d5b0989183cb48a8e</string>
<key>FirebaseAutomaticScreenReportingEnabled</key>
<false/>
</dict>
</plist>
</plist>

0 comments on commit 8a1e0b5

Please sign in to comment.