ServiceContainer.swift 623 B

1234567891011121314151617181920
  1. import Foundation
  2. import Swinject
  3. private let resolver = FreeAPSApp.resolver
  4. enum ServiceContainer: DependeciesContainer {
  5. static func register(container: Container) {
  6. container.register(NotificationCenter.self) { _ in Foundation.NotificationCenter.default }
  7. container.register(Broadcaster.self) { _ in BaseBroadcaster() }
  8. container.register(GroupedIssueReporter.self) { _ in
  9. let reporter = CollectionIssueReporter()
  10. reporter.add(reporters: [
  11. SimpleLogReporter()
  12. ])
  13. reporter.setup()
  14. return reporter
  15. }
  16. }
  17. }