Apple tentatively plans to begin rolling out the change in iOS 12 and macOS 10.14 next year, and it could announce the news as soon as WWDC 2018 in June, according to the report. The exact timeline is subject to change.
Just like with most programming techniques, there are multiple "flavors" of dependency injection - each with its own pros & cons. This week, let's take a look at three such flavors and how they can be used in Swift.
Singleton is a class which has only one instance existing at a time. Even if you have just started iOS programming, it is very likely that you have already worked with singletons like UIApplication.shared and UIDevice.current. These objects represent entities which exist as one instance in the physical world, so it is natural to be able to have only one instance of those in the app.