FirebaseInfo.swift 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2025 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 Foundation
  15. // TODO: Remove `@preconcurrency` when possible.
  16. @preconcurrency import FirebaseAppCheckInterop
  17. @preconcurrency import FirebaseAuthInterop
  18. @preconcurrency import FirebaseCore
  19. /// Firebase data used by FirebaseAI
  20. @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
  21. struct FirebaseInfo: Sendable {
  22. let appCheck: AppCheckInterop?
  23. let auth: AuthInterop?
  24. let projectID: String
  25. let apiKey: String
  26. let firebaseAppID: String
  27. let app: FirebaseApp
  28. init(appCheck: AppCheckInterop? = nil,
  29. auth: AuthInterop? = nil,
  30. projectID: String,
  31. apiKey: String,
  32. firebaseAppID: String,
  33. firebaseApp: FirebaseApp) {
  34. self.appCheck = appCheck
  35. self.auth = auth
  36. self.projectID = projectID
  37. self.apiKey = apiKey
  38. self.firebaseAppID = firebaseAppID
  39. app = firebaseApp
  40. }
  41. }