统计点添加完毕firebase

This commit is contained in:
bluesea 2024-04-12 15:39:58 +08:00
parent 70f2e078ff
commit 69fee51f46
3 changed files with 17 additions and 5 deletions

View File

@ -36,18 +36,21 @@ class VRPhotoTransformController: BaseController {
lazy var progressView:CCTransformProgressPopView? = { lazy var progressView:CCTransformProgressPopView? = {
let pv = CCTransformProgressPopView.init(frame: view.bounds) let pv = CCTransformProgressPopView.init(frame: view.bounds)
pv.closeActionBlock = { [weak self] in pv.closeActionBlock = { [weak self] in//
self?.navigationController?.popToRootViewController(animated: true) self?.navigationController?.popToRootViewController(animated: true)
pv.removeFromSuperview() pv.removeFromSuperview()
Analytics.logEvent("result_back_click", parameters: nil)
} }
pv.transformActionBlock = { pv.transformActionBlock = {//
pv.isHidden = true pv.isHidden = true
Analytics.logEvent("result_continue_click", parameters: nil)
} }
return pv return pv
}() }()
// //
func showProgress() { func showProgress() {
Analytics.logEvent("process_pv", parameters: nil)
if self.progressView?.superview == nil { if self.progressView?.superview == nil {
self.view.addSubview(self.progressView!) self.view.addSubview(self.progressView!)
} }
@ -253,6 +256,7 @@ class VRPhotoTransformController: BaseController {
showProgress() showProgress()
DispatchQueue.main.async { DispatchQueue.main.async {
self.progressView?.updateProgress(value: 1) self.progressView?.updateProgress(value: 1)
Analytics.logEvent("result_pv", parameters: nil)
} }
//3D //3D
@ -292,6 +296,7 @@ class VRPhotoTransformController: BaseController {
} }
} else { } else {
DispatchQueue.main.async { DispatchQueue.main.async {
self.progressView?.updateProgress(value: 1) self.progressView?.updateProgress(value: 1)
self.progressView?.updateInfo(title: NSLocalizedString("转码完成", comment: ""), desc: NSLocalizedString("导出内容已存储到相册中", comment: "")) self.progressView?.updateInfo(title: NSLocalizedString("转码完成", comment: ""), desc: NSLocalizedString("导出内容已存储到相册中", comment: ""))
} }

View File

@ -63,12 +63,14 @@ class VRVideoTransformController: BaseController {
var mBottomBtn:UIButton? var mBottomBtn:UIButton?
lazy var progressView:CCTransformProgressPopView? = { lazy var progressView:CCTransformProgressPopView? = {
let pv = CCTransformProgressPopView.init(frame: view.bounds) let pv = CCTransformProgressPopView.init(frame: view.bounds)
pv.closeActionBlock = { [weak self] in pv.closeActionBlock = { [weak self] in//
self?.navigationController?.popToRootViewController(animated: true) self?.navigationController?.popToRootViewController(animated: true)
pv.removeFromSuperview() pv.removeFromSuperview()
Analytics.logEvent("result_back_click", parameters: nil)
} }
pv.transformActionBlock = { pv.transformActionBlock = {//
pv.isHidden = true pv.isHidden = true
Analytics.logEvent("result_continue_click", parameters: nil)
} }
return pv return pv
}() }()
@ -93,6 +95,7 @@ class VRVideoTransformController: BaseController {
// //
func showProgress() { func showProgress() {
Analytics.logEvent("process_pv", parameters: nil)
if self.progressView?.superview == nil { if self.progressView?.superview == nil {
self.view.addSubview(self.progressView!) self.view.addSubview(self.progressView!)
} }
@ -854,6 +857,7 @@ extension VRVideoTransformController {
writer.add(writerInput) writer.add(writerInput)
DispatchQueue.main.async { DispatchQueue.main.async {
Analytics.logEvent("result_pv", parameters: nil)
self.progressView?.updateProgress(value: 1) self.progressView?.updateProgress(value: 1)
} }

View File

@ -6,7 +6,8 @@
// //
import UIKit import UIKit
import Firebase
import FirebaseCore
class SceneDelegate: UIResponder, UIWindowSceneDelegate { class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow? var window: UIWindow?
@ -25,12 +26,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
// Release any resources associated with this scene that can be re-created the next time the scene connects. // Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
print("sceneDidDisconnect") print("sceneDidDisconnect")
Analytics.logEvent("equipment_disconnect", parameters: nil)
} }
func sceneDidBecomeActive(_ scene: UIScene) { func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state. // Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
print("sceneDidBecomeActive") print("sceneDidBecomeActive")
Analytics.logEvent("equipment_connect", parameters: nil)
} }
func sceneWillResignActive(_ scene: UIScene) { func sceneWillResignActive(_ scene: UIScene) {