View ExampleApp.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@main | |
struct ExampleApp: App { | |
init() { | |
if ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1" { | |
// SwiftUI Preview is running. | |
// Do nothing. | |
} else { | |
FirebaseApp.configure() |
View ExampleApp.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol FirebaseService { | |
func configure() | |
} | |
class RealFirebaseService: FirebaseService { | |
func configure() { | |
FirebaseApp.configure() | |
let settings = FirestoreSettings() | |
Firestore.firestore().settings = settings | |
} |
View ExampleApp.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@main | |
struct ExampleApp: App { | |
init() { | |
FirebaseApp.configure() | |
let settings = FirestoreSettings() | |
Firestore.firestore().settings = settings | |
} | |
View CleanArchitecture.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MARK: - UseCases | |
struct InputData {} | |
protocol InputBoundary { | |
func doSomething(inputData: InputData, presenter: OutputBoundary) | |
} | |
protocol OutputBoundary { | |
var viewModel: ViewModel { get } |