Under The Bridge Under The Bridge

Category: Software
Nine Releases Make An Xcode

All these new APIs are very well and all, but now let’s get to the really exciting stuff from WWDC:

What’s New in Xcode 9

  • All new editor. Fast, structure-based editor that lets you intelligently highlight and navigate your code. Includes great Markdown support.
  • Refactoring. Refactoring built right into the editing experience and works across Swift, Objective-C, Interface Builder, and many other file types.
  • Super-fast search. The Find navigator returns results instantly.
  • Debugging. Wirelessly debug iOS and tvOS devices over the network, new debuggers for Metal, and more features throughout Xcode.
  • Source Control. All new source control navigator and integrated support for GitHub accounts for quickly browsing repositories and pushing your repositories to the cloud.
  • Xcode Server built-in. Continuous integration bots can be run on any Mac with Xcode 9, no need to install macOS Server.
  • New Playground templates. Includes iOS templates designed to run well in both Xcode and Swift Playgrounds in iPad.
  • New Build System. An opt-in preview of Xcode’s new build system provides improved reliability and performance.

That is … a remarkable array of improvements. And those are just the highlights! Seriously, go Read The Whole Thing™. Most are runtime and debugging improvements, we’ll just pick out to highlight further here the changes in asset catalogs, since there’s some new resource stuff here you’ll want to be aware of to be iOS 11 savvy:

Asset Catalogs

  • Named colors support.
  • Added wide gamut app icons.
  • Added a larger iOS marketing to the App Icon set.
  • Added option to preserve image vector data for matching Dynamic Type scaling.
  • Added support for HEIF images.

The biggest one there is, as explained here,

Preserve Vector Data

There’s a new checkbox in the Asset Catalog Attributes Inspector called “Preserve Vector Data.” Checking this box will ensure that Xcode includes a copy of the PDF vector data in the compiled binary. At runtime, iOS can automatically upscale or downscale the vector data to output an image in your app whether you’re using the image in code or in a Storyboard scene. Remember: When using PDF vector data, set the “Scales” value to “Single Scale” in the Attribute Inspector to ensure the proper loading the PDF vector data to populate image.

This change also works in conjunction with the new Tab Bar icon HUD that Apple implemented as an accessibility feature in iOS 11. If you enable “Preserve Vector Data” this feature comes to your apps with no additional work. By enabling this feature, iOS 11 can also automatically scale images regardless of whether you’re increasing a UIImageView’s bounds, or using Size Classes to change an UIImageView size…

Screenshot samples at The Unexpected Joy of Vector Images in iOS 11.

And apparently Apple is bowing to popular pressure and making Xcode all but dependent on Github, see Xcode GitHub Integration and The Marriage of Github and Xcode 9. We’d mutter something curmudgeonly about why don’t you go full fanboi and replace the documentation with hotlinks to Stack Overflow too, but we’re worried they might take that idea seriously…

Community support we do find quite appealing though, is how enthusiastically the new stuff is being open sourced:

Apple open sources key file-level transformation Xcode components

This afternoon at WWDC we announced a new refactoring feature in Xcode 9 that supports Swift, C, Objective-C, and C++. We also announced we will be open sourcing the key parts of the engine that support file-level transformations, as well as the compiler pieces for the new index-while-building feature in Xcode…

And if that bit about “new build system” struck terror into your massively scripted heart, fear not, it appears to be pretty much a behind the scenes change all around:

New Xcode Build System and BuildSettingExtractor

The new system is written in Swift and promises to be a significant advance in a number of areas including performance and dependency management. The new system is built on top of the open source llbuild project and lays the foundation for integrating the Xcode build system with the Swift Package Manager

It appears that everything about defining build settings remains unchanged. Moving between the old and new build systems did not cause any build setting changes or recommended changes. The mechanisms for generating that giant bucket of key-value pairs known as build settings seem to be just the same as before.

This is great news. As developers, we don’t need to learn a new complex system for defining build settings. We get to enjoy the benefits of a new, faster, modern build system with our existing build settings left intact…

(And if you haven’t moved to .xcconfig files yet, or if you do them by hand, seriously do go check out BuildSettingExtractor. So handy, we even contributed to it — and that’s as high praise as it gets, around these parts!)

That’s enough for a TL;DR to get you salivating for the new stuff — but if you missed our link to New stuff from WWDC 2017 last time, go check it out now; more details on Xcode changes there … and everything else as well. Veritably encyclopedic, that reference!

OK, one last note that isn’t Xcode 9 specific but you’ll want to refer to it anyways: iOS Simulator Power Ups. Something for everyone there!


Hands-on XCUITest Features with Xcode 9

Customizing the file header comment and other text macros in Xcode 9

iOS Simulator on steroids: Tips & Tricks

Little Xcode Beta Surprises 🎁: Core Graphics Codable Conformance

Measuring Swift compile times in Xcode 9gist example — Two Useful Environment Vars

Awesome native Xcode extensions

Secret variables in Xcode AND your CI for fun and profit ?

Xcode 9 Vector Images

Managing different environments in your Swift project with ease

Conditionally embed your dynamic frameworks

Everything You Need to Know About Ruby for iOS Development

Optimizing-Swift-Build-Times: “Collection of advice on optimizing compile times of Swift projects.”

Swift compilation time debugging options and their outputs

Let’s Optimize the Work with Terminal for Xcode Developers

Easy XIB and Storyboard Localization

Some useful URL schemes in Xcode 9

IBLinter: “A linter tool for Interface Builder”

AutoLayoutLint: “Provides automated test to detect runtime conflicts of constraints.”

More Interface Builder Tips And Tricks

XcodeGen: “Command line tool that generates your Xcode project from a spec file and your folder structure”

Edit Breakpoints in Xcode

XcodeWay: “An Xcode Source Editor Extension that helps navigating to many places easier.”

Highlight Warnings in Xcode

Care and Feeding of Xcode Configurations

How to find and fix slow drawing using Instruments

How to find and fix memory leaks using Instruments

How to find and fix slow code using Instruments

Xcode Releases

Wrestling with a Monstrous Xcode Project

Compiler Optimizations, Compiling Optimally, and Whole Modules

Periphery “analyzes projects written in the Swift programming language to identify unused code.”

Tip: add “time” to your build scripts

Xcode Project Linter (xcprojectlint): “A security blanket for Xcode project files”

Getting (nearly) rid of Xcodeproject – A (not so) short Introduction to Xcodegen

Periphery: Eliminate Unused Swift Code

Running Xcode and Simulator in fullscreen

New Bestie: Microsoft?

Feels pretty strange writing this when you lived through the 80s and 90s, but Microsoft is kinda on a roll helping out Apple-based programmers recently, isn’t it?

First off, Visual Studio Code is definitely our favorite Electron app, and is rapidly taking over pretty much all our text editing needs not done in Xcode.

Then, we have Visual Studio for Mac! OK, what we really have is a rebranded Xamarin, yes. That’s still a massive leap forward in officially endorsing practical cross-platform options by anybody’s lights, and downright glorious if you’re a Mono/C# fan. Or a Unity game dude. Or a .NET Core server dude. Or someone who loves shopping at NuGet.org. Or, people who like working with Docker and/or Azure:

Visual Studio for Mac: now generally available

Since we released the first Visual Studio for Mac preview last November, we’ve been working hard on porting over the web editor tools from Visual Studio on Windows. Now with this release, you have full support to build out rich web-based applications using ASP.NET Core and front-end languages like HTML5, CSS3, and JavaScript.

And when your web app is perfectly polished and ready for release, you can directly publish to Azure using the new Publish to Azure wizard, without having to leave the IDE…

… today we also talked about some great new preview features, which we’ll make available in our alpha channel really soon. These are preview features that are not present on the stable release, but ready for you to try once released and give us feedback:

  • Docker support: supporting deploying and debugging of .NET Core and ASP.NET Core in Docker containers.
  • Azure Functions support: use this preview to develop, debug and deploy Azure Functions from your Mac.
  • Target IoT devices: target IoT devices like Android Things with your C# code and Xamarin.

That’s … quite the toolkit to have officially supported by Microsoft on macOS!

But what’s got us really paying attention now isn’t actually the tools, interesting as those are. We’ve been feeling a little bit grumbly about Google grabbing up Crashlytics et al. and the ALL YOUR DATA BELONG TO GOOGLE licensing terms coming into force, so this looks very very interesting indeed:

More Platforms, More Choices, More Power: Visual Studio Mobile Center at Build

Last fall we introduced Visual Studio Mobile Center (Preview), a cloud service designed to help developers manage the lifecycle of their mobile apps and ship higher-quality apps faster than ever. Today we announced several exciting improvements that expand the features of the service and extend Mobile Center to new audiences and platforms…

A great CI/CD pipeline is critical to delivering software quickly and with confidence. The Mobile Center Build, Test, and Distribute services are designed to make this a part of every developer’s workflow. Our Crash reporting and Analytics services ensure that you can learn about each release’s quality and usage, but a common request we’ve heard from developers is the ability to send Push messages using Mobile Center Analytics data to help ensure that the right end-user is receiving timely notifications. This tightens the loop from check-in all the way through deep engagement with end-users.

With our new Push service, Mobile Center developers can send targeted messages to specific sets of users at exactly the right time. Customers can create segments based on over a dozen different properties, including carrier, language, device model, screen size, and time zone, with many more to come…

Several Preview customers told us they loved our Test service, but they wanted to write their tests in a more familiar, platform-specific framework. We listened, and we now support XCUITest and Espresso, the native test frameworks for iOS and Android. Now developers can write their automated UI tests in their preferred languages and port existing tests to Mobile Center Test…

Mobile Center has offered a powerful beta tester distribution service since our first preview, with successful builds automatically sent to testers with ease. Developers have told us they’d love this same mechanism to let them deploy the applications to app stores and company portals.

With our new enhancements to the Distribute service, once a developer is confident about their apps quality, they can promote the latest build directly to an app store or company portal. Today you can do this with Google Play, and very soon we’ll be adding connectors for Intune, the App Store, and the Windows Store…

Mobile Center is the next generation of HockeyApp. Starting today, we’re launching the first step in our transition plan for HockeyApp users: use existing apps from HockeyApp inside Mobile Center, analyze crash reports and analytics, and connect to the Build, Test, and Push services…

New mobile platforms, testing frameworks, push services, and repo support are just the beginning—we have a lot more coming soon. Deployments to consumer app stores and secure private portals will be coming in the next few months, as will increased support for UWP, parity with our HockeyApp and Test Cloud services, and entirely new cloud development services. Sign up now to get started!

Yup … we’re thinking that looks like a really attractive alternative to Google-dependent lifecycle management for our apps. We’ve signed up, we’ll use it for our next cross-platform app, and see how that goes!

May The 4th Be Swift You

Got your Swift 3 rewrites all done? Good, good, because now it’s time for…

What’s new in Swift 4.0

Swift 4.0 is a major new release for everyone’s favorite app development language, and introduces a variety of features that let us write simpler, safer code. You’ll be pleased to know it’s nothing as dramatic as the epic changes introduced with Swift 3.0, and indeed most changes are fully backwards-compatible with your existing Swift code. So, while you might need to make a handful of changes it shouldn’t take long.

WARNING: Swift 4 is still under active development. I’ve selected some of the most interesting and useful new features for discussion below, all of which are implemented and available to try now. Please keep in mind that more features are likely ship in the months before final release.

  • Swifty encoding and decoding…
  • Multi-line string literals…
  • Improved keypaths for key-value coding…
  • Improved dictionary functionality…
  • Strings are collections again!…
  • One-sided ranges…
  • There’s more still to come…

The first release of Xcode that ships with Swift 4 is likely to arrive in June, presumably along with iOS 11, tvOS 11, watchOS 4, and macOS Somewhere Else In California. What we’ve seen so far is already promising, particularly because it’s clear the team is working hard to make Swift 4 as additive as possible. Primarily adding new features rather than breaking or modifying existing ones should make it easier to upgrade to, and hopefully signals the start of a new stability for the language…

One feature that was postponed was ABI compatibility, which would allow developers to distribute compiled libraries – one of the few key missing features that remain in Swift today. Hopefully we’ll get it before Swift 5… So if you want to get a jump on this year’s Grand Transition, go check that out.

And if you’re really eager:

Playground: Whatʼs new in Swift 4

I made an Xcode playground that lets you try out many of the new features coming in Swift 4. You can

download it on GitHub


The cool thing is that you can run the playground right now in Xcode 8.3; you donʼt have to wait for the first official Swift 4.0 beta, which will probably come as part of Xcode 9 at WWDC. All you need to do is install the latest Swift snapshot from swift.org (donʼt worry, itʼs easy)… Hands-on code examples to help you learn what’s new in Swift 4: new encoding and decoding, smarter keypaths, multi-line strings, and more!

Yeah, personally I think we’ll manage to contain ourselves for that 17 more days, thanks. Handy playground to have around then though!


Breaking changes in Swift 4 What’s New in Swift 4? Encoding and Decoding in Swift 4 Migrating to Swift 4

What’s New in Swift (WWDC 2017.402)

WWDC videos on Swift:

Exploring the new String API in Swift 4Strings in Swift 4Swift Substrings

The surprising awesomeness of Grouped Dictionaries The startling uniquing of Swift 4 dictionaries Functional Lenses: an exploration in Swift

Kuery: “A type-safe Core Data query API using Swift 4’s Smart KeyPaths”

Parsing JSON in Swift 4

Ultimate Guide to JSON Parsing With Swift 4

JSON with Encoder and Encodable

JSON to Swift with Decoder and Decodable

Friday Q&A 2017-07-14: Swift.Codable

Decoding Dictionaries in Swift

Swift 4 Decodable: Beyond The Basics

Swift 4’s Codable: One last battle for Serialization

What’s New in Swift 4 by Example

Key Value Observation in iOS 11

What’s New In Animations In Swift 4 Struct References

DefaultsKit “leverages Swift 4’s powerful Codable capabilities to provide a Simple and Strongly Typed wrapper on top of UserDefaults.”

Why not use UserDefaults to store Codable objects

Swift and KVO context variables

A Funny Thing Happened On The Way To This Array

Friday Q&A 2017-08-11: Swift.Unmanaged

The Best New Features in Swift 4

Floating-point Swift, ulp, and epsilon

Weak Arrays

Understanding Swift 4 generics and applying them in your code

#318: Codable Enums ?Swift Tip: Codable Enums

Better initializers and defaulted arguments

First-Class Swift API for Objective-C Frameworks

The surprising awesomeness of Grouped Dictionaries

Taking Advantage of Generics and Codable in Swift

Eliminating Impossible States with Never

How Swift keypaths let us write more natural code


You know, one thing we’ve found very strange over the last nearly 20 years: Various strategies for animations arrive, cause a flurry of activity, then slowly die out; but nobody ever seems to take the obvious to us path of working with Scalable Vector Graphics (SVG) to leverage what’s a long proven and widely supported (for flexible values of “supported”…) cross-platform vector animation format. When we did that October Challenge thing seven years ago we used LevelSVG to do it, and did the editing in Inkscape which was … well … we don’t like to be impolite (unless it’s funny, of course) so let’s just say it is clearly not a native app.

There are many other options, pretty much every vector drawing program supports SVG in some fashion, but generally they’re far better at importing than exporting, and quality of export is generally suboptimal and definitely not tuned to the format capabilities. What we need is an editor designed specifically for the format, and free and Open Source would be perfect …

… wait, what’s this?


macSVG is a MIT-licensed open-source macOS application for designing and editing Scalable Vector Graphics (SVG) content for HTML5 web pages, mobile apps, animation design, and general graphics usage.

SVG is an open-source format for computer graphics documents based on the authoritative Scalable Vector Graphics (SVG) 1.1 (Second Edition) – W3C Recommendation 16 August 2011 from the World Wide Web Consortium (W3C), and is supported on most modern web browsers, and many application frameworks.

macSVG can produce dynamic, high-quality graphics and animation for HTML5 web views that can be displayed on most major desktop and mobile platforms, including iOS, Android, macOS, Microsoft Windows and Linux…

Well, isn’t that just awesome with a side helping of awesomesauce?

And the rendering side is active these days too, if you haven’t caught our various off-handed references check out Macaw, and Macaw-Examples, and these posts:

How friendly can drawing API be on iOS?

…I don’t even want to think about maintaining such a hierarchy using pure CoreGraphics. To use the power of Macaw you only need to inherit your control view class from MacawView or use MacawView as a container and let the magic begin. An added benefit is that any change to the scene’s properties will automatically trigger a content update for the view…

Macaw iOS Library: Morphing Animations

Macaw is an open source library which makes vector graphics drawing and animation easy and enjoyable. Not long ago we released the 0.8.2 version with interesting updates.

Morphing Animations

From the beginning of this project we wanted to implement smooth transformation between shapes. Ability to morph paths into other arbitrary paths provides a way to create complex effects. We introduced a new member of the animation’s family — Morphing Animation…

Touch Events

We also made improvements to the existing API. For example, new touch events API additions to make more advanced touch events handling possible…

So yeah, next time you have some vector interactivity and/or animation needs, we’re thinking that macSVG plus Macaw looks like a really promising strategy. Try it out and let us know!

h/t: @oss_objc!

PS. For another approach, check out Snowflake based on the Reindeer XML and HTML parser which could be kinda handy other places as well!


Is Using SVG Images Good for Your Website’s Performance?

Fan-Menu – A Swift Based UI Component For Custom Animated Circular Menus

Sketching The Future

So no doubt you’re aware that Sketch is pretty much the goto tool for UI/UX work these days, but unless you were watching very closely — even if you were watching very closely, actually — you might have missed a most interesting improvement in the latest release, Sketch 43:

Here’s a quick overview of the key updates Sketch 43 introduces:

  • Improved shape editing to speed up your workflow
  • We’re retiring legacy plugins, so they’ll no longer work
  • Over 40 other improvements and bug fixes, including an update to Mirror, a new file format and changes to nested symbol overrides

Missing the interesting part? It’s the “a new file format” part:

With this release, we’ve introduced a new Sketch file format, which means documents created with Sketch 43 will not be compatible with previous versions.

Still not getting the interesting here? Let us examine some outside opinions:

With Sketch 43, Design IS Code & Code IS Design

Sketch 43 will revolutionise software design work. The next version of Sketch will have an new file format that allows to read and write .sketch files manually or programatically. This strategic move will make designers and frontend engineers skip (the visual aspect of) frontend frameworks like Bootstrap or Zurb Foundation and go from Sketch straight to implementation…

With Sketch 43 you can now alter or create the very document that describes visual form and color from scratch, programmtically. That could be any element, modular component or an entire screen UI.

We do not have a need anymore to build templates based on visual layouts. Furthermore, we do not need to go through design definition phases before going into implementation. Forget the USP “Pixel-perfect design”.

The design IS the code, and the code IS the design.

Anything visual can now go back and forth between Sketch and UI frontend seamlessly. Designers now define the actual UI code. Developers can now make changes to the .sketch file with a simple click…

Various articles with further tidbits:

Sketch 43 is coming to town with a new game. An open file format!

Sketch 43 will change the way we work and think

New file format in Sketch 43

New file format in Sketch 43 and what we learned about it

Everything you need to know about the Sketch 43 file format

Sketch 43: A brief tour of fact vs folklore

sketch-web-viewer: “View and inspect Sketch 43 files in browser

And while this isn’t new, it will probably be of interest for scripting workflows:

Sketch-Server: “A Sketch Plugin that creates a local web server for your Sketch Documents.”

By default, Sketch Server returns an HTML page containing your image, centered (when smaller than viewport). You can specify both page, artboard, scale, and what kind of content the server returns to you… If you’d like just the image (png), you can get it using the /image path

Our immediate application is, we’d like something like this, but that draws 30+ localized languages from our CMS:

Generate App Store images for all iPhone sizes from Sketch

which should now be eminently doable. That’ll streamline the release process nicely!

So keep an eye on Sketch Hunt and Sketch App Sources and all the rest of the Sketch developer community … likely to be some mighty interesting stuff coming!


Optimizing Sketch Files: Lessons Learned In Creating The Reduce App

Why Your App Looks Better in Sketch

Sketch and Reveal, 2 best friends

Working with assets in Xcode and Sketch

Rolling Back In

PSA: Did you think, like us, that Rollout thing looked pretty neat, but questionable despite their assurances

Update Native iOS Apps without the App Store. How is this Legit?

…FYI, Rollout’s SDK is installed on over 50 million iOS devices and there’s never been an app rejected because it uses Rollout. I’m just saying that because it’s good to know that thousands of other developers are using Rollout, so you’re not alone.

Um, yeah. About that:

Apple Rejecting Apps That Use Rollout

Just got this message for a few of my apps that are live in the app store (and have been for years).

“Your app, extension, and/or linked framework appears to contain code designed explicitly with the capability to change your app’s behavior or functionality after App Review approval, which is not in compliance with section 3.3.2 of the Apple Developer Program License Agreement and App Store Review Guideline 2.5.2. This code, combined with a remote resource, can facilitate significant changes to your app’s behavior compared to when it was initially reviewed for the App Store. While you may not be using this functionality currently, it has the potential to load private frameworks, private methods, and enable future feature changes.

This includes any code which passes arbitrary parameters to dynamic methods such as dlopen(), dlsym(), respondsToSelector:, performSelector:, method_exchangeImplementations(), and running remote scripts in order to change app behavior or call SPI, based on the contents of the downloaded script…

Well, that’s a start; how about banning React Native next so we can stop having to argue with pointy-haired bosses that JavaScript sucks? We kid, we kid. We like JavaScripters, really. It’s so cute watching them pretend to be grownups! Okay, we’ll actually stop teasing now, let’s see how Rollout is addressing the situation:

While Apple has not modified its guidelines , it appears that these guidelines are now being interpreted in a more narrow way. We are disappointed that Apple has made this change before we have had an opportunity to address any concerns. We have already reached out to Apple to discuss and are committed to adjusting our offering as needed to remain in compliance under the more narrow interpretation of the guidelines…

We understand and respect the fact that Apple must have the ability to control its ecosystem, and we recognize that our appeal may not succeed.

However, Rollout.io will move forward regardless!

First, for the last year we have been readying an entirely NEW product offering which addresses the entire app development process, not only post-production. This new product, which we will be announcing and launching for developer preview in April, will be in full compliance with Apple’s more narrow interpretation of its guidelines…

Well, good luck with that, guys. We’ll check back in April and update with how that’s going!


An Open Letter to Apple from Rollout.io – Proposing a SECURE JavaScript Injection Approval Process

Rollout The Red Carpet

So you might have heard of Rollout.io before:

Update Live Mobile Apps

Instantly Fix Bugs|

Deploy code-level changes to native iOS apps, without waiting on the App Store.

Which works by remotely swizzling your methods up to and including completely replacing with JavaScriptCore-executed code, which is 100% legit as a delivery method, no really it is, here check the latest rules:

3.3.2 … 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.

All well and good then … except that swizzling only works in Objective-C and it’s $CURRENT_YEAR, who still writes Objective-C? Cha, we’d spend our ever so valuable blogging space on that right after an in-depth article on the state of 3270 emulation, amirite? (With all due respect to the author of that no doubt invaluable if you need it fine bit of work, mind you, just that most of the world has moved on a bit!) Well, look at what the boffins over Rollout way have come up with now:

Hi Everyone,

I’m delighted to announce that Rollout now supports Swift apps!

After months of development, testing and tweaking we’ve just released our official Swift support.

If you’ve been waiting for Swift support in order to try out Rollout, either create a new app and install the SDK or upgrade your existing app with the latest SDK version…

Uh … yeah? And just how exactly did you get that to work?

The heart of Rollout’s Swift patching magic lies in a technique we call Pre-SIL instrumentation.

SIL stands for Swift Intermediate Language, it is generated from the Abstract Syntax Tree. This intermediate form is used by the Swift optimizer to perform Swift language specific optimizations prior to generating the LLVM IR.

Rollout instrumentation needs to happen before the optimization phase so it will work even if the method was inlined, the dispatching was de-virtualized and more (I’ll write more about optimizations in Swift in the near future).

To add this code instrumentation Rollout runs the following flow:

  1. Replace the swiftc compiler with a proxy script
  2. When swiftc compiles a file, intercept the file and instrument it
  3. Identify all methods in file
  4. Instrument all methods with the patching mechanism

All of the above needs to happen without a cost in compile time, runtime and most importantly maintaining a consistent debugging experience (as if Rollout didn’t touch your code)…

Well, brush our teeth and call us pearly. If that does indeed work as advertised, that is quite the leap forward for application maintenance, isn’t it? Looks like the free tier doesn’t support Swift so it’s not a completely trivial cost to adopt, but hey, it’s pretty cheap compared to the damage a broken app could do you!

iMessage In A Bottle

So you jumped on board the iMessage train yet? It’s important enough the mothership gives it a top level website folder no less,

iMessage + Apps

Check that out for links to WWDC videos, sample codes, yada yada yada for apps and stickers. Never really got the whole sticker thing until moving here to Thailand where Line is the preferred means of communication to the tune of 90% of mobile Internet users; but yeah, they send a couple billion a day. If you’ve got anything resembling artistic ability, might want to look into that, hey it’s a seriously good paying market for clip art!

More interesting to most of you Dear Readers I imagine would be the opportunities to write apps, and here is an excellent article to get started on that:

Introducing the Airbnb iMessage App

We started out looking to define the grand vision of planning your Airbnb trip within Messages — what would that look like on this new platform? Over the course of just a few weeks before the iOS 10 release, our team rapidly prototyped on a variety of ideas. We started with countless drawings and mockups of possible features, and as we became more familiar with the possibilities and limitations of the Messages Framework, a product began to form. Once we had something we could use, a group iMessage thread between engineers, designers, and product managers allowed us to quickly discover the features we wanted — a rather meta approach. At this point, we had an iMessage app where people could share homes between friends and view key details about the accommodation…

Speaking of collaboration, an iMessage app wouldn’t be complete without an additional social feature: voting. When sharing a message with friends, each collaborator can vote on homes they like and see who else has voted on them. This gives the trip organizer a bird’s-eye indication of the most popular listing, greatly simplifying the decision of which one to book…

Goes on in detail about features, limitations, and process; even if you’re not currently planning an iMessage app, in which case you probably should be, this’ll get you up to speed with the state of the framework nicely!


More Than Stickers: Exploring iMessage App Utilities

Machines Of Learning Grace

Our nominee for Most UnderDiscussed Shiny New Stuff with this year’s Apple crop definitely has to be BNNS. What, not ringing a bell? Ch-ch-check it out:

The Accelerate framework’s new basic neural network subroutines (BNNS) is a collection of functions that you can use to construct neural networks. It is supported in macOS, iOS, tvOS, and watchOS, and is optimized for all CPUs supported on those platforms.

Of course, there’s a perfectly good reason it hasn’t made more of a splash, which is

BNNS supports implementation and operation of neural networks for inference, using input data previously derived from training. BNNS does not do training, however. Its purpose is to provide very high performance inference on already trained neural networks.

That’s a bit too high of a bar to jump, right? Well, not quite as much as you’d think! See, if you even noticed Google open sourcing TensorFlow at all, you probably figured it was a bit academic for any real world application you were working on, right? Well, here’s the inestimable Aaron Hillegass to explain the synergy here:

Use TensorFlow and BNNS to Add Machine Learning to your Mac or iOS App

Thus, there are two ways to get deep learning into your Mac or iOS application:

Solution 1: Do all the neural net work on a server using TensorFlow. You must be certain that all your users always have a good internet connection and that the data you are sending/receiving is not too voluminous.

Solution 2: Train the neural net using TensorFlow and export the weights. Then, when you write the iOS or Mac application, recreate the the neural net using BNNS and import the weights.

Google would love to talk to you about the first solution, so the rest of this posting will be about the second. I’ve used TensorFlow’s MNIST example: handwritten digit recognition with just an input and an output layer, fully connected. The input layer has 784 nodes (one for each pixel) and the output has 10 nodes (one for each digit). Each output node gets a bias added before it is run through the softmax algorithm. Here is the source, which you will get automatically when you install TensorFlow.

My sample code is posted on GitHub

So right now you can ship trainees that won’t learn any more — and feel free to fill in a simile of your choice here for a laugh — if you have a static problem space in your app that could be enhanced with a bit of clever; or you could just get up to speed on the technology now and wait for the almost certainly inevitable addition of backpropagation in future releases! Here’s some more light reading and viewing to help you out with that:

WWDC16 715 – Neural Networks and Accelerate

Basic Neural Network Subroutines: Using The Accelerate Framework’s Convolution Filters

Neural Networks in iOS 10 and macOS

The “hello world” of neural networks

Make Xcode 8 Again

Our favorite from the Xcode 8 beta 3 Release Notes is actually this polite little convenience:

.xcconfig files support conditional inclusion of other .xcconfig files, using the syntax #include? instead of the usual #include (which still generates a warning if the file is missing, as before). (11003005)

Sweet! As we’ve mentioned before, it’s much more elegant maintainable and trackable to manage your project settings textually, and this makes that just that much more elegant. That’s pretty much the theme of Xcode 8, it seems: make everything that much more elegant. We thoroughly recommend that you go through the release notes with every new release, but If you’ve been to keep up with that, here’s a good TL;DR on the high points:

What’s New in Xcode 8

1. Swift 2 and 3

Up until Xcode 8, every version of Xcode was tied to a specific version of the Swift programming language. That is no longer true as of Xcode 8. Swift 3 introduces a slew of changes and a considerable number of these changes are breaking…

2. Source Editor Extensions

Developers have been asking for a native plugin architecture for many years. Source editor extensions are a first good step in that direction… [However, note that Alcatraz is dead, so this is a mixed blessing at best -Ed.]

3. Debugging

View debugging is much more powerful in Xcode 8. Reliability has improved and debugging ambiguous or unsatisfiable layouts is much easier thanks to an improved view debugger that displays runtime issues … Xcode 8 also sports a pretty impressive memory debugger for tracking down memory leaks and retain cycles…

4. Code Signing

Code signing issues should be a thing of the past with Xcode 8 … I hope Apple got it right this time. And with me tens of thousands of other developers.

5. Other Improvements and Enhancements

San Francisco Mono; Line Highlighting; Code Completion for Images

6. Documentation

The new documentation format looks gorgeous and the documentation browser is fast and easy to use. Apple also consolidated the documentation for its platforms, resulting in a much smaller memory footprint….

There’s a longer list as part of this veritably encyclopedic collection of What’s New In Everything:

New Stuff from WWDC 2016

Following the tradition from last year, here’s my complete list of all interesting features and updates I could find in Apple’s OSes, SDKs and developer tools that were announced at this year’s WWDC. This is based on the keynotes, the “What’s New In …” presentations and some others, Apple’s release notes, and blog posts and tweets that I came across in the last few weeks…

We’ll go out on a limb here and predict that the thing mentioned here you’re most interested in a deeper dive into is code signing. And here’s a discussion of team implications, and here’s an optimistic article going into thorough background detail:

Code Signing in Xcode 8

Code signing and managing provisioning profiles has been an ongoing annoyance for many developers over the years. I have written and spoken extensively to help people understand what code signing and provisioning profiles are and how they can be better managed. So, you can imagine my surprise and excitement when Matthew Firlik mentioned code signing and provisioning during the Platforms State of the Union (53:30) at this year’s WWDC. It was also revealed that the schedule contained an entire session, What’s New in Xcode App Signing, and two Labs dedicated to the topic. So, does Xcode 8 solve all of my code signing and provisioning profile grievances? Pretty much…

And if you still want more, there’s details and discussions collected over at Michael Tsai’s

Xcode 8 Tips and Issues


Linting swift code; SwiftFormat

Xcode Extensions; Xcode 8 extensions; How to Create an Xcode Source Editor Extension

Simultaneous Xcode 7 and Xcode 8 compatibility

Xcode Visual Memory Debugger; Memory Graph Debugger Tips; WWDC 2016: Visual Debugging with Xcode  

Xcode 8 Document Coding Enhancements

Multiplatform, Single-scheme Xcode Projects

Stop the Xcode 8 iOS Simulator from logging like crazy

Xcode 8: New Build Settings and Analyzer Improvements

objc-dependency-visualizer: “Objective-C and Swift dependency visualizer.”

objc_dep: “Graph the import dependancies in an Objective-C project”

#278: Saving Time With Source Editor Extensions 🤖🛠

ProTip: Why debug with print when you can dump?

Speeding up Development Build Times With Conditional dSYM Generation

Reducing Swift Compile Time

Running tests with Clang Address Sanitizer; Undocumented Xcode Sanitizer Settings

UIKit Debug Mode

Better Xcode Run Script Build Phases; Xcode Run Script Build Phase debugging

Want to understand why your app launch is slow?

Open Sourcing Our Xcode Project Templates

Xcode internal debug logs

Understanding Data Race Detection by Implementing it in Swift

Colorizer: “auto-generate a Apple’s Color Palette file (.clr file) from .txt file.”

Eject – A Tool For Generating Swift Code From A Layout Created In Xcode’s Interface Builder

Refactorator / RefactoratorApp : “for refactoring Swift & now Objective-C code.”

A Visual Listing Of Many Great Xcode 8 Shortcuts

Automated Xcode Build Numbers, Late 2016 Edition

synx: “A command-line tool that reorganizes your Xcode project folder to match your Xcode groups.”

“Ever lamented over your unorganised project files? struct solves that by making your filesystem be your project structure. How it is on disk is how it is in your project. Simple.”

simMagnifier: “Easily access latest run apps on your iOS Simulators. Explore folders, edit Core Data content and much more.”

Using ccache for Fun and Profit

Creating an Xcode Project with a Built-in Playground

9 Tips for Setting up a New Xcode Project

Xcode and Regex

Automatic Memory Leak Detection on iOS

FengNiao: “A command line tool for cleaning unused resources in Xcode.”

Audible Xcode Breakpoints

How To Create Multiple Versions Of Your iOS App In Xcode Part 1

match: Code Signing with Teams

BuildTimeAnalyzer-for-Xcode: Regarding Swift build time optimizations; Swift build time optimizations — Part 2