VPCamera3/SwiftProject/SwiftProject/AppDelegate.swift
2024-04-03 18:19:06 +08:00

93 lines
3.3 KiB
Swift

//
// AppDelegate.swift
// SwiftProject
//
// Created by soldoros on 2024/1/10.
//
/*
com.peuid.snsdev
com.nks.vptest
https://moonvy.com/invite/97510620-9c5f-4af2-ab86-982a8ce4e09c
https://avb2dt3u5c4.feishu.cn/docx/MRRedj0p9ocNa3x6LkycqGyqn0e
https://apifox.com/apidoc/shared-088c9b06-e12a-490b-9f99-6949fb51dbbb
https://www.finnvoorhees.com/words/reading-and-writing-spatial-video-with-avfoundation
*/
import UIKit
import SVProgressHUD
import Firebase
import FirebaseCore
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
// var root:RootManager?
var newWindow:UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Task {
FirebaseApp.configure()
// }
SVProgressHUD.setDefaultStyle(.dark)
// self.window = UIWindow(frame: UIScreen.main.bounds)
// self.window?.backgroundColor = UIColor.white
// self.window?.makeKeyAndVisible()
Analytics.logEvent("user_launch", parameters: ["type":"new"])
SKUPay.sharedInstance.requestProducts(productsIdentifiers: MemberShipModelItem.getProductsIDs())
SKUPay.sharedInstance.setUpUserInfo()
return true
}
// func exceptionLogWithData() {
// CopyCrashHandler.setDefaultHandler()
// let str = CopyCrashHandler.getdataPath()
// let data = NSData.init(contentsOfFile: str)
// if data != nil {
// let crushStr:String? = String.init(data: data! as Data, encoding: String.Encoding.utf8)
// Analytics.logEvent("app_crash", parameters: ["crashInfo":crushStr ?? ""])
//
// CopyCrashHandler.cleanCrashInfo()
// }
//
// }
//--
func applicationWillEnterForeground(_ application: UIApplication) {
print("applicationWillEnterForeground...")
Analytics.logEvent("user_launch", parameters: ["type":"restart"])
}
func applicationWillTerminate(_ application: UIApplication) {
}
// func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// print("configurationForConnecting....")
// let scene = UIWindowScene(session: connectingSceneSession, connectionOptions: options)
//
// // Configure a window for the screen.
// self.newWindow = UIWindow(frame: CGRect(x: 0, y: 0, width: 2000, height: 1000))
// self.newWindow!.backgroundColor = UIColor.yellow
// // Install a custom root view controller in the window.
//
// let viewController = UIViewController()
// self.newWindow!.rootViewController = viewController
// self.newWindow!.windowScene = scene
//
// // You must show the window explicitly.
// self.newWindow!.isHidden = false
// NotificationCenter.default.post(name: Notification.Name(rawValue: "NSZZHHasNewWindowExternal"), object: self, userInfo: ["newwindow":self.newWindow!])
// return UISceneConfiguration(name: "External configuration", sessionRole: connectingSceneSession.role)
// }
}