Screen shot 2016 07 29 at 10.46.39

The 12 Apps of Swiftmas

For the holiday season, we held a special meetup featuring the 12 Apps of Swiftmas! We hand-picked 12 Swift projects created in 2014, and invited their creators to share issues or neat Swift features they ran into, in front of our very special Swiftmas Tree. There were presentations on a variety of projects, from an iWatch extension, to a bitcoin wallet framework, and more!

(You can also find a recap of the meetup below.)


Bluecap (0:00)

Bluecap by Troy Stribling is a Bluetooth LE framework that is a configurable central and peripheral manager. It does iBeacon ranging and emulations, and also has a collection of GATT profiles. Bluetooth LE uses a client server model, where the peripheral (the server) presents structure data to the central (the client). The data, organized into services with characteristics, is called a GATT profile. The central can scan in two modes, either promiscuous or service.

Burst2GIF (3:45)

Saniul Ahmed’s Burst2Gif is an app that takes photo bursts from recent iPhones to make gifs. After taking a burst of photos, you can turn that into an M4V video, or a gif, with varying speeds. However, it hasn’t been submitted yet due to existing bugs. He’s also created an app called Stoke, which uses Artsy’s open API, which is like Tinder for art. Swipe right to like and left to ignore a work of art! His third project is a Watch extension for the app Heyday, a journal made from your photos and locations. This extension will never forget the last time you were somewhere!

GroceryList (6:16)

GroceryList by Steph Fairclough is a simple and clean Swift iOS8 application created to share grocery lists between partners, families, friends, and coworkers. It makes neat use of Realm and Swipe libraries to split grocery shopping into categories by department for a divide and conquer approach. Adding a food to the list is quick, and after finding something in the store, just swipe to delete it from the list. The next step will be building out a server, making sure the app doesn’t crash, and probably some cross-platform support.

Realm (7:37)

Presented by JP Simard, Realm is the first Swift optimized database for mobile phones that is super fast because everything is memory mapped. Realm really tries to leverage some powerful parts of the language of Swift, like generics and compile time safety, to work at a high level. The Cocoa binding for Realm is entirely open source, with the Core Database engine in the process of being open sourced as well. One really nice thing about Realm is that if you add in an object within a write closure in this Swift version, there process is direct - there’s no serialization and deserialization. Swift especially shines when we query since it can return a generic list. Anytime that you’ll want to use a property on an object, it will give you compile time safety and also have queries be as lazily loaded as possible, which will prevent needless fetching.

Heartbeat (12:40)

Ben Morrow has created a prototype Apple Watch app called Heartbeat for realtime heart monitoring. Heartbeat detects the beat in your wrist and shows an animation on the screen, with the colour of the heart indicative of the beat pattern, whether erratic or stable. A tap on the heart will show the rhythm strip view of the heartbeat. The data model uses structs, with optional values for bpm and duration. The app also makes neat use of the Swift feature allowing the use of emojis in code! As part of a larger group, he helped run a workshop and hackathon for the then newly released WatchKit, with event videos and descriptions found here. More code for a Watch Simulator can let you make apps that are more native and stand-alone than is available on WatchKit currently.

jazzy (17:40)

The goal for jazzy, presented by Samuel Giddins, is to allow you to document Swift projects! It’s built on an XPC wrapper called SourceKitten, which leverages the SourceKit service for parsing, so the text parsing is left to Apple’s Swift compiler. This means it’s really accurate and it works, providing the exact same docs that come out when you option-click on something in XCode. One of the goals of Jazzy is to be really configurable and to be a tool that anyone can use to build the docs they want, so it has a fair number of options. A pretty good reference on Swift Documentation has been written by Matt Thompson. Unlike the Apple Doc comments we’re used to, Swift documentation is supposed to use REST, or restructured text. A feature that Samuel’s currently working on is Dash Docset support, that will allow you to search through your docs and provide you with the exact place in your docs your search term is. What’s next for jazzy includes more robust tooling, documentation generation on CocoaDocs, stronger CocoaPods integration, Objective-C support, and more!

Lambdatron (23:26)

Austin Zheng has created Lambdatron, a simple Lisp interpreter that is still a work in progress. The syntax and semantics were inspired by Clojure, and it was created both for fun and to understand Lisp better. Hopefully, it can be embedded into larger Swift apps as a scripting language. There are two key parses: one is a cons class that represents a node in a linked list; the other is a really big ConsValue enum that represents the things that lists can contain. This interpreter can also understand when you create functions that return other functions. For more features, as well as a list of future goals, find Austin’s project here!

Design Time (28:56)

Michael Helmbrecht presented Design TIme, a quick and practical walkthrough of IBDesignable with GIFs for which code can be found here. Technically a toolchain feature, IBDesignable lets Interfact Builder render your views after every save, saving the user from having to run code after every save to view any changes made. Adding the “@IBDesignable” before your custom UIView class will let Interface Builder draw for you. The IBInspectable keyword allows you to edit within Interface Builder itself. The basic breakdown of the process is first, IB will call your view’s init(frame:) method, then prepareForInterfaceBuilder(), after which IB does the standard layout and drawing process.

Stakes (34:14)

Stakes, by Alexis Gallagher, is a messaging app with a game component, originally started in Objective-C and then in Swift upon its release. Its backend is based on Parse, which has caused a few issues because it hasn’t been updated for Swift yet. Stakes has all the normal messaging app features, like signup/signin, profile management, and comment threads. The gameplay logic is still under wraps, since beta testing will be occurring soon. One problem encountered during the process, until XCode 6.1.1 was released, was XCode’s poor ability to handle the sheer number of lines of Swift code used, starting at about 5000 lines of code. For one of the Swift + Parse problems of Swift-only types, computed properties were a workaround. There were also some IBDesignable road bumps, like IBDesignable’s “automatically refresh live views” feature, but overall, it provided a positive experience.

Walkie

Jaime Ohm spoke about Walkie, a messaging application for sending cute animated creatures to friends. Jaime showed an early version of the application, talked about the current incompatibilities between SceneKit and standard 3D models, and how she went about choosing a voice distortion algorithm.

PagerDuty (44:01)

The 11th app of Swiftmas, PagerDuty, is an alerting and on-call management system for IT professionals that Clay Smith helped to rewrite in Swift. The service, previously based on Cordova, makes sure the right person gets alerted at the right time. The Swift version of the app actually saw memory usage decrease by 60% due to the performance capabilities of a native app compared to a hybrid one. The rewrite was done using a new Swift project template called Liftoff and started with the AppDelegate and main view controller/login code. From that, they imported all existing view controllers with a bridging header, and rewrote each view controller one by one. The data model is still in Objective-C and the app uses Core Data, so it’s mostly the view controller logic that is in Swift. The failable initializers and optional chaining were very convenient, and Clay found the switching from ObjC to Swift generally led to shorter view controller subclasses. Structs were also very handy as a lightweight view model. StackOverflow was very impressive in its capacity as a Swift resource even though Swift is still so new.

BitcoinSwift (49:52)

BitcoinSwift, presented by Kevin Greene, is an iOS and OS X framework for BitCoin wallet apps. For a long time Apple had banned BitCoin apps from the App Store, but during WWDC the updated terms of service suddenly allowed BitCoin apps. As a result, there were few libraries that provided programmers with the power to create a BitCoin wallet with just a few lines of code, so that became part of the project Kevin has been working on. A wallet needs something that stores keys, as well as a network component to allow peer-to-peer protocol, the latter of which is what Kevin has built so far. Possible future features include support for multi-peg channels.


Get more development news like this

Next Up: New Features in Realm Obj-C & Swift

General link arrow white

About the content

This content has been published here with the express permission of the author.

JP Simard

JP works at Realm on the Objective-C & Swift bindings, creator of jazzy (the documentation tool Apple forgot to release) and enjoys hacking on Swift tooling.

4 design patterns for a RESTless mobile integration »

close