add in firebase logging

This commit is contained in:
Trey t
2022-03-11 10:32:12 -06:00
parent 612483e7f0
commit 215ad5bb6d
6 changed files with 223 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import UserNotifications
import UIKit
import WidgetKit
import SwiftUI
import Firebase
class AppDelegate: NSObject, UIApplicationDelegate {
private let savedOnboardingData = UserDefaultsStore.getOnboarding()
@@ -20,7 +21,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
// PersistenceController.shared.deleteLast(numberOfEntries: 5)
// GroupUserDefaults.groupDefaults.set(false, forKey: UserDefaultsStore.Keys.showNSFW.rawValue)
FirebaseApp.configure()
PersistenceController.shared.removeNoForDates()
PersistenceController.shared.fillInMissingDates()
UNUserNotificationCenter.current().delegate = self
@@ -33,6 +34,8 @@ class AppDelegate: NSObject, UIApplicationDelegate {
UITabBar.appearance().standardAppearance = appearance
UITabBar.appearance().scrollEdgeAppearance = appearance
EventLogger.log(event: "app_launced")
return true
}

15
Shared/EventLogger.swift Normal file
View File

@@ -0,0 +1,15 @@
//
// EventLogger.swift
// Feels
//
// Created by Trey Tartt on 3/10/22.
//
import Foundation
import Firebase
class EventLogger {
static func log(event: String, withData data: [String: Any]? = nil) {
Analytics.logEvent(event, parameters: data)
}
}

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>113402203908-pp7g3udve7koa6tmmovrdj83kq2egugd.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.113402203908-pp7g3udve7koa6tmmovrdj83kq2egugd</string>
<key>API_KEY</key>
<string>AIzaSyDtkxvslzC5Fv3n-JfXqvIY6rTZrNCOh5E</string>
<key>GCM_SENDER_ID</key>
<string>113402203908</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.88oak.ifeelDebug2</string>
<key>PROJECT_ID</key>
<string>ifeeldev-5b1ad</string>
<key>STORAGE_BUCKET</key>
<string>ifeeldev-5b1ad.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:113402203908:ios:90d3fb2e367af0adab4a51</string>
</dict>
</plist>