AppDelegate.swift 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright 2019 Google
  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 Firebase
  15. // Verify that the following Firebase Swift APIs can be found.
  16. import FirebaseAnalytics
  17. import FirebaseInAppMessaging
  18. import UIKit
  19. class CoreExists: FirebaseApp {}
  20. class AnalyticsExists: Analytics {}
  21. class AuthExists: Auth {}
  22. // Uncomment next line if ABTesting gets added to Firebase.h.
  23. // class ABTestingExists : LifecycleEvents {}
  24. class DatabaseExists: Database {}
  25. class FirestoreExists: Firestore {}
  26. class FunctionsExists: Functions {}
  27. class InAppMessagingExists: InAppMessaging {}
  28. class InAppMessagingDisplayExists: InAppMessagingDisplay { // protocol instead of interface
  29. func displayMessage(_ messageForDisplay: InAppMessagingDisplayMessage,
  30. displayDelegate: InAppMessagingDisplayDelegate) {}
  31. }
  32. class MessagingExists: Messaging {}
  33. class PerformanceExists: Performance {}
  34. class RemoteConfigExists: RemoteConfig {}
  35. class StorageExists: Storage {}
  36. @UIApplicationMain
  37. class AppDelegate: UIResponder, UIApplicationDelegate {
  38. func application(_ application: UIApplication,
  39. didFinishLaunchingWithOptions launchOptions: [UIApplication
  40. .LaunchOptionsKey: Any]?) -> Bool {
  41. // Override point for customization after application launch.
  42. return true
  43. }
  44. // MARK: UISceneSession Lifecycle
  45. func application(_ application: UIApplication,
  46. configurationForConnecting connectingSceneSession: UISceneSession,
  47. options: UIScene.ConnectionOptions) -> UISceneConfiguration {
  48. // Called when a new scene session is being created.
  49. // Use this method to select a configuration to create the new scene with.
  50. return UISceneConfiguration(name: "Default Configuration",
  51. sessionRole: connectingSceneSession.role)
  52. }
  53. func application(_ application: UIApplication,
  54. didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
  55. // Called when the user discards a scene session.
  56. // If any sessions were discarded while the application was not running, this will be called
  57. // shortly after application:didFinishLaunchingWithOptions.
  58. // Use this method to release any resources that were specific to the discarded scenes, as they
  59. // will not return.
  60. }
  61. }