December 2018
Intermediate to advanced
414 pages
10h 19m
English
With every Worldwide Developers Conference (WWDC), a new set of OSs is released. This often means tweaking our current projects to accommodate new APIs, provide backwards compatibility, and explore new and shiny features. All those changes can be tedious; even more so if you're maintaining multiple platforms such as iOS, watchOS, tvOS, Linux, and so on.
Let's focus on a simple case: registering for push notifications. We can abstract the intention of registering with the following protocol:
typealias ResultBlock = (Bool, Error?) -> Voidprotocol PushNotificationService { func register(_ done: ResultBlock)}
PushNotificationService is an object that has a register(:) function, with a ResultBlock output that ...
Read now
Unlock full access