CompactMap vs flatMap: The differences explained
The differences between compactMap and flatMap explained with examples and a rule of thumb to decide whether you need map, flatMap or compactMap.
The Swift Concurrency Playbook
A FREE 5-day email course revealing the 5 biggest mistakes iOS developers make with async/await that lead to App Store rejections And migration projects taking months instead of days (even if you've been writing Swift for years).
5 lessons | 100% free | For iOS developers
Learn more and get better in Swift using this list of Swift blog posts, tutorials, tips, and tricks.
The differences between compactMap and flatMap explained with examples and a rule of thumb to decide whether you need map, flatMap or compactMap.
Trigger custom errors and warnings during compile time and warn for TODOs in your codebase. Using #line and #file points you to the right file and method.
Where is a powerful keyword within Swift to filter out values. It can be used in many different variants from which most of them are listed in this post.
Handle typed notifications containing data with typed representers to improve the readability of your code using extensions on top of the Swift API.
Almost all apps contain some kind of data requests. Printing data requests could sometimes be handy for debugging purposes. This can be done fairly easy by using a custom `URLProtocol`.
Controlling Progress children by default makes it easy to add child progress instances, but removing is not possible by default. This could have been useful when you want to use a single Progress instance which can have different children over time. Using a custom class MutableProgress makes this possible.
The Share Extension of your app can be UI tested in a few easy steps using the following Swift extension. The video below shows an example of a certain UI Test run.
Update to Swift 4.1 which is introduced on the 29th of March and comes with Xcode 9.3. Use these simple steps and find all related resources which brings you up to speed to migrate and optimise to Swift 4.1
Using protocol extensions in Swift it's really easy to create optional protocol methods, which support using structs in your protocol as well.
Hi there! After thinking a lot of starting my own blog, I've finally made the decision to create one! As ...