Swift Developments is a hand-curated newsletter containing a weekly selection of the best links, videos, tools and tutorials for people interested in designing and developing their own apps using Swift.
So it’s been a big week for Apple. Along with the launch of the new HomePod, there’s also been new beta release of Xcode 9.3 containing a number of goodies including a new tool for detecting app power usage as well as a new macOS 64-bit testing mode to help with the impending 32-bit phase out. On top of this there was also an major update to ARKit thrown in which add s a bunch of new features including the ability to recognize vertical services and detect real-life 2D images like signs and posters. The iPad hasn’t been left out either, with Swift Playgrounds receiving a new update that introduces the ability for creators to provide subscription-based content directly within the app.
Although for many, In-App purchase is the primary route to monetisation, far fewer developers actively try to optimising their in-app purchase experience and as a result, may inadvertently be leaving money on the table. With this in mind @hadyelhady93, has written a useful guide highlighting some of the models, techniques and optimisation strategies that some of the top-grossing apps use to maximise their apps earnings potential.
For some reason I managed to miss this article last week. It’s an interesting post from Slopes developer @parrots that gives some insight into the potential benefits of the App Store’s new re-design as well as the effect that ‘App of the Day’ can have on app sales – even in a relatively niche market. Kudos to Curtis for sharing all the details.
So we’ve already seen links this week showing how important In-App purchase is as a revenue stream, and we’ve learnt some techniques on how to optimise that workflow, but when it comes to testing IAP, it isn’t all plain sailing. @jeiting highlights some of the pain points with testing In-App purchases and makes some suggestions on how things could be improved. Let’s hope Apple are listening.
Wanting to geek out about all low-level design details of the iPhone X’s curved corners? @bradellis has you covered with an in-depth and detailed look at how they are constructed in all their curved beauty.
As part of his ongoing exploration of Cocoa architectural patterns, @cocoawithlove pushes forward the ideas from his ‘View-State Driven Applications’ talk that I linked to in Issue #113 by looking at the implications of unidirectional data flows on the traditional MVC design pattern.
Along with this weeks first beta release of Xcode 9.3 comes the first release of Swift 4.1. Swift 4.1 contains a number of new improvements including synthesized Equatable and Hashable conformance (🎉), a part renaming of
compactMap and the inclusion of conditional conformance a powerful new feature that allows types to conditionally conform to protocols based on some other condition. @twostraws walks you through all the new changes.
So as I mentioned, one of the big new features in Swift 4.1 is the addition of conditional conformance – the ability of types to conditionally conform to a protocol based on some other condition. Once you’ve got the overview from @twostraws above, @gregheo has been diving into it in a bit more detail.
Error handling is an essential part of developing in Swift but with both synchronous and asynchronous errors surfacing in our code @norapsi looks at how to organise your app-architecture to handle these errors in a way that easily scales.
Bursting the myth that reflection isn’t possible in Swift due to Swift’s strong type system, @jckarter talks Reflection – how it can be achieved in Swift, how it works with Swift’s type system as well as some of the problems that Reflection can solve.
Beyond the red-green-refactor triumvirate of TDD, @qcoding gives a live coding demo to help illustrated three further laws that underpin TDD itself and collectively ensure that we keep our development progress heading in the right direction.