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.
Welcome to another week of Swift Developments. It’s been a busy week this week with lots of new goodies and some great articles. Before we dive in though, I just wanted to mention that for the first time in a long time I’ve got a few days off next week and need a bit of a break so there won’t be an issue of Swift Developments. Don’t worry though, service will be resumed with Issue 108 on Oct 10th. In the mean time, enjoy the links and I’ll be back in your inbox in two weeks time!
Swift 4.0 Released
So there’s been big news in the Swift world this week with the offical release of Swift 4.0! @tkremenek made the annoucement on the Swift.org website and also provided a nice overview of some of the changes that were included. If you haven’t been playing with Swift 4.0 already it’s worth pointing out that the upgrade is nothing like the carnage of Swift 3 and includes a compatibility mode in the Swift compiler that lets you continue with your Swift 3.2 code until you’re ready to upgrade. Check out the link for more details.
On top of the release of Swift 4.0, this week has also seen the official release of iOS 11, Xcode 9, watchOS 4 and tvOS 11. The new releases include simulators for all the new devices announced at last weeks events so make sure you download them if you want to see your app layouts on the new iPhone X.
Key Performance Indicators (or KPIs), can provide a useful way of assess the value that your app is delivering to users and are also a good way to understand how your app is performing overall. Picking the right KPIs isn’t always an easy task though so the team at @inapptics have put together a useful guide to get you started.
As developers, it’s often tempting to dive straight into the code and start implementing things, but time and experience shows that it’s just as important, if not more important, to get a good understanding what you’re going to build before you start. This often means writing some sort of requirements specification which can be a little daunting if you’ve never done it before. To help with this, @otusweb has outlined a simple process for you to work through that includes some useful questions and prompts to guide you on your way.
An interesting review from @oueryan on some of the – how shall we put this – less polished areas of iOS 11. I’ll warn you – once you see some of these you can’t unsee them and if you’re anything like me they’ll start to bug you. Hopefully they’ll get fixed over the coming weeks.
By default, testing
fatalError is a bit of a pain, after all if you call it within your test code your tests are going to crash. With that said, @MarcoSantaDev has come up with a nice workaround that lets you get this code under test. The other bonus is that the same techniques can also be used when testing other failure methods such as
preconditionFailure as well.
@eli_ganem and the team at @rwenderlich with an abridged chapter from their book Swift Apprentice. If you’ve not had a look at the new serialization APIs it provides a good overview of the changes introduced in Swift 4.0.
With the recent introduction of ARKit, the interest in SceneKit has understandably grown as it provides a powerful framework for building and manipulating 3D objects in a 3D scene. If you’re in the process of looking at SceneKit for the first time, @geppyp has written a useful introductory tutorial to get you started.
Although Swift’s strong typing provides a number of significant benefits, when it comes to compile times, the type-checker remains a performance bottleneck. Although things have improved signficiantly, there are still times where the type checker doesn’t make particuarly smart decisions. When this does happen, there are actually a number of compiler flags that can help diagnose issues. @jesse_squires shows you how.
A slightly tongue in cheek library from @harshilshah1910 that helps to hide the notch on iPhone X and creates a card-like interface for your app. I actually quite like it myself but be careful if you’re going to use it in your own apps as there’s still uncertainty as to whether it violates Apples HIG and could result in your app being rejected when it comes to App Store review.
AudioKit is an audio synthesis, processing and analysis platform for iOS, macOS and tvOS from the team at @AudioKitMan. It comes with a number of example apps as well as support for Xcode Playgrounds which are a great way to get up to speed in advance of using it in your own projects.
Xcodeproj @pepibumur is a swift library for parsing and working with Xcode project files letting you write command line scripts to add new build phases, modify build settings and create new schemes.