A Swift framework for rapid development using a collection of utility extensions for Foundation and UIKit classes and protocols, along with associated unit tests. Cross-platform targets for iOS, watchOS, and tvOS and were used across various apps for providing a central and extensible API.
Delegation is a simple and powerful pattern. However, closures are more Swifty and scales better. Let’s convert delegates to closures!
Thread-safe resources in Swift can be achieved with Grand Central Dispatch. Using a concurrent queue and the barrier flag, reads can occur in parallel while writes are given mutual exclusivity for safety and optimization.
GCD is not for thread-unsafe shared resources since it does not guarantee the same thread will be used for the queue. We can use the threads API with a bit of sugar syntax.