AppDelegate.swift 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. import UIKit
  15. import FirebaseCore
  16. import FirebaseMLModelDownloader
  17. @main
  18. class AppDelegate: UIResponder, UIApplicationDelegate {
  19. func application(_ application: UIApplication,
  20. didFinishLaunchingWithOptions launchOptions: [UIApplication
  21. .LaunchOptionsKey: Any]?) -> Bool {
  22. // Override point for customization after application launch.
  23. FirebaseApp.configure()
  24. FirebaseConfiguration.shared.setLoggerLevel(.debug)
  25. return true
  26. }
  27. // MARK: UISceneSession Lifecycle
  28. func application(_ application: UIApplication,
  29. configurationForConnecting connectingSceneSession: UISceneSession,
  30. options: UIScene.ConnectionOptions) -> UISceneConfiguration {
  31. // Called when a new scene session is being created.
  32. // Use this method to select a configuration to create the new scene with.
  33. return UISceneConfiguration(
  34. name: "Default Configuration",
  35. sessionRole: connectingSceneSession.role
  36. )
  37. }
  38. func application(_ application: UIApplication,
  39. didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
  40. // Called when the user discards a scene session.
  41. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
  42. // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
  43. }
  44. }