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.
Is This An Emoji Crackdown?
So this week has brought a bit of controversy within the community with Apple rejecting a number of apps for the inclusion of emojis citing a lack of compliance with the trademarks and copyrights section of the app review guidelines as the reason. Although a number of these apps have subsequently been accepted, it is still unclear whether this is part of a larger Apple crackdown or just an over-zealous reviewer. @jeremyburge has written a good summary of all the goings on.
10 Changes to the App Store That Can Get Your App More Downloads
Overall the new App Store re-design has received a general thumbs up from most developers I’ve talked to but what do these changes mean for your app? The team at @appfigures have come up with a number of opportunities within the new app store design and provide some actional advice on how you can take advantage.
Code Size Optimization Mode in Swift 4.1
With the arrival of Swift 4.1, the Swift compiler has gained a new optimization mode that enables some dedicated optimisations to reduce the size of your compile Swift code. Instead of compiling for performance, the new optimisation mode lets you specifically focus on compiling for minimal size rather than maximum speed. Check out the new post from @eeckstein on the Swift.org blog for all the details.
Swift 4.1 Codable Improvements
Introduced in Swift 4.0, Swift’s new Codable protocol is become by far the easiest way of converting Swift objects into XML and JSON but it was not without it’s annoyances. One of these is the mis-match between snake_cased key names and camelCase property names resulting in the need for your own
CodingKeys mapping. Swift 4.1 however has introduced a fix for this by way of a new
keyDecodingStrategy property on
JSONDecoder which can automatically convert between the two forms. @twostraws has been putting it through it’s paces.
iOS Subscription Groups Explained
In 2016, Apple announced changes to the app-store subscription model that meant that developers who managed to retain subscription users on a (at least semi-continuous) basis for more than a year would have their slice of the subscription pie increased from the default 70% up to 85% for each subsequent billing cycle. At the same, Apple also introduced the concept of subscription groups. @jeiting takes an in-depth look explaining what they are and how you can use them.
Getting Started with Moya
Moya has been around for some time now. Build on top of Alamofire, Moya provides a network abstraction layer between Alamofire and your application code, letting you abstract away the nitty gritty of calling into the Alamofire framework and providing a number of other architectural and testing benefits. If you’re thinking about using Moya in your own applications, make sure you check out this introductory article from @MDevSA which will help you get up to speed.
Beginning Machine Learning with Keras and Core ML
With the arrival of the Core ML and Vision frameworks at last years WWDC a wide range of new possibilities have been opened up to the Apple development community. In this tutorial, @mataharimau provides a great introduction to this area, showing you how train your own deep learning convolutional neural network, how to convert that network to Core ML and how to then integrate it into your own iOS app.
Notification Handling on WatchKit
Developing for WatchKit is fundamentally different experience from developing for UIKit due to the inherit limitations of the WatchKit framework and the approach to handling notifications in WatchKit is no exception. In this tutorial, @jablair walks through how to setup, display, handle and test notifications in your watchOS app and in doing so covers a number of best-practices, gotchas and lessons learnt along the way.
This week has seen an exciting announcement from @krausefx and the team at fastlane who have started working on an open-source, self-hosted, mobile-optimized CI system powered by fastlane. It’s still early days but has lots of promise and with all the development being done in the open it’s definitely one to keep an eye on.
Buckets of Code
In this talk from dotSwift 2018, @subdigital of NSScreencast fame, provides some pragmatic advice on how to find your own way with your application architecture by introducing your own objects that have just one single responsibility and how doing so, can help reduce the size of your view controllers and make your software more flexible and maintainable in the long-term.
Finally Solving the Expression Problem
In this talk, @bkase_ looks at the Expression Problem – the problem of how to define a data type where we can add new variants and behaviour to that type without losing type safety or having to modify the original data type – before moving on to explore how we can solve this problem in Swift.