-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Singletons can be a source of tight coupling and testing difficulties.
Improvement:
Provide a way to inject dependencies or consider using protocols to allow for easier testing and decoupling.
protocol CrashHandling {
func setUpCrashHandler()
func processCrashReport()
var sendCrashReportToServer: (([String: String]) -> Void)? { get set }
}
class Crashlytic: CrashHandling {
// Implementation
}Metadata
Metadata
Assignees
Labels
No labels