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.
News
Apps Using JavaScripCore Update Techniques Roll Into Trouble
Section 3.3.2 of the Apple Developer License Agreement states:
“…an Application may not download or install
executable code. Interpreted code may only be used in an Application if all scripts, code and
interpreters are packaged in the Application and not downloaded. The only exceptions to the
foregoing are scripts and code downloaded and run by Apple’s built-in WebKit framework or
JavascriptCore, provided that such scripts and code do not change the primary purpose of the
Application by providing features or functionality that are inconsistent with the intended and
advertised purpose of the Application as submitted to the App Store.”
Up until now, Apple has taken a relatively relaxed approach to enforcing compliance with this section of the developer agreement. However things have suddenly changed this week with Apple quoting the clause above as the reason for rejecting a number of apps that use “hot push” SDKs to dynamically update themselves via JavaScriptCore.
Whilst I personally don’t have a problem with Apple enforcing these guidelines (after all the clause above is what we sign up to as developers and the ‘live update’ technique has always seemed to be a bit of a loop-hole to me) what’s most troubling is the lack of communication and lack of notice that Apple has given to developers before changing their interpretation. Not only does this leave developers with a problem it also leaves companies like Rollout.io rapidly pivoting. Given this new crack-down, it’s going to be interesting to see whether apps using similar techniques via React Native are next up in Apple’s cross-hairs.
9to5mac.com
Business
Ruthless Prioritisation
Development teams always have loads to do, especially those teams who work on multiple apps in parallel. With so much to do then, how do teams prioritise what they should work on? @BrandonMChu provides a useful framework that can help.
medium.com
Lower Your Rates (Sometimes) – Investing in Building Your Portfolio
As a new freelance developer it’s not uncommon to set your rates lower-than-average in order to attract new customers. Its also not unusual to want to raise those rates over time as your experience and perceived market value increases – after all higher-rates equals more money. However there are occasions where it makes sense to actually lower your rates. @brandontreb explains.
brandontreb.com
Swift
Overriding Swift Protocol Extension Default Implementations
In this article, Jonah Williams looks some workarounds to avoid unexpected behaviour when subclassing types that conform to protocols in Swift.
goodeggs.com
Safeguarding Equatable Implementations
In this article, @olebegemann explains a useful technique for adding robustness to your Equatable
types in Swift through the use of the standard libraries dump
function. Clever idea.
oleb.net
That One Optional Property
@khanlou discusses how the use of optional properties in view controllers can lead to a lack of clarity within your Swift code and looks at how we can change the structure of our view controllers to make things a little more explicit. It’s an interesting read.
khanlou.com
Code
Parse Server Tutorial with iOS
Although the popular backend service Parse is no more, as part of the closure process the Parse SDK’s were released into the open-source community. Now thriving as a popular open-source project on GitHub, Parse Server is a potential option if your looking for a self-hosted backend solution for your app. @ronksa has written a useful tutorial if you’re looking to setup a Parse Server solution of your own.
raywenderlich.com
Parsing a JSON Response and Saving it in Core Data – A Step By Step Guide
It’s common task. Downloading data from some sort of JSON-based web API and then persisting that data within your app. However, if you’ve never done it before, it can be a little confusing to fit all the moving parts together. In this tutorial, @roch4brun walks through the whole process step-by-step.
medium.com
Getting Started with Tensor Flow on iOS
Over the last year or so there has been a growing buzz of excitement surrounding deep learning and it’s potential uses within mobile apps and for many Google’s TensorFlow library has become the tool of choice when it comes to creating and developing neural networks and machine learning models. If, like me, you’ve not dived into this area much, this tutorial from @mhollemans provides a great introduction.
machinethink.net
Tools
Audible Xcode Breakpoints
I’ve never really thought about configuring Xcode to create audible breakpoints but having read this article from @hmblebee I can see some advantages. Matt has written up some useful instructions if you want to do the same and also has a set of custom sound clips that you can also use.
sound-of-silence.com
Kite Compositor
This week has seen the release of Kite a powerful new animation and prototyping tool for Mac and iOS. As their marketing material states – “It’s kind of like Sketch meets After Effects meets Keynote” and has a build-in JavaScript scripting engine for adding additional complex animation logic and interactions. Looks promising.
kiteapp.co
Libraries
Request Permission
Request Permissions is a swift-based UI component from @ivansprw for managing permissions and includes a polished UI for requesting access to the camera, photo library, notifications, location, microphone and calendar. Looks good.
github.com
PPMusicImageShadow
PPMusicImageShadow is a custom view from Pierre Perrin that imitates in real time the shadow blurred effect from the iOS Music App.
github.com
Videos
UI and Snapshot Testing
@Lascorbe discusses snapshot testing – a technique for comparing views rendered within your tests to a previously captured snapshot in order to test for regressions and speed up your UI testing and also provides a demonstration of how to get them up and running using Quick, Nimble and FB Snapshot Test Case.
realm.io