WWDC 2019 Wishlist Results

Parameters in SiriKit custom intents & Fine-grained Shortcut integration (apps provide blocks): Parameters are definitely in and I believe (from the SOTU demos) that the Shortcuts app can directly call into intents with parameters, thus enabling more fine-grained interactions. This is great news, and even if you don’t think Siri as a voice-assistant would be useful for your app, you should want this for Shortcuts integration.

On-device transfer learning in CoreML: This is also in and unlocks all kind of on-device ML applications. There is also a new category of “easy” ML integration (voice/sound analysis) along with a ton of other improvements. CreateML is now a Mac app instead of being integrated into Playgrounds.

HKLiveWorkoutBuilder (from watchOS) in iOS: I don’t see any mention of HealthKit or workouts at all in the release notes, so no luck here.

Web->AppStore->App ad attribution (w/o user tracking): Even though this was not announced, I have some hope that this could happen. The WebKit announcement of an privacy preserving ad click tracking mechanism is evidence that this problem is on their radar.

The App Store story is even worse, because there is no official way to pass some kind of data through your App Store URL that the App gets on first start. The normal attribution mechanism, IDFA, is not available to websites (only apps), so the only way to do a website-ad -> AppStore -> App attribution is for the web site and App to “fingerprint” the user somehow. One simple way is a correlation with time and an IP address, but that isn’t perfect. Unfortunately, many apps (and 3rd party ad trackers) do not stop there.

The last few years have been a cat-and-mouse game between Ad Tech firms finding loopholes in iOS (e.g. shared Pasteboards) and Apple closing them. It would be much better if Apple provided a privacy preserving mechanism and then explicitly forbade anything else in the developer agreement.

Multi-select image picker: No luck this year.

WWDC 2019 Wishlist

Today I tweeted

Here’s a quick elaboration

Parameters in SiriKit custom intents: The custom intents that were introduced last year do not support recognition-time parameters. All of the parameters of the intent must be baked into the intent. SiriKit calls this “resolving parameters” and the built-in intents all support this, but custom ones do not.

On-device transfer learning in CoreML: Transfer learning allows you to build a new model from an existing one by providing more examples. CoreML added that last year, but you still need to train and build the new model off-device. I’d like a way to build new models this way on-device from device gathered examples (which would preserve privacy).

HKLiveWorkoutBuilder (from watchOS) in iOS: This class is only available for watch workout apps, but a simpler version would be nice for iOS workout apps. It obviously can’t gather heart rate, but it could automatically build the route and perhaps use a less sophisticated algorithm for guessing calories burned.

Web->AppStore->App ad attribution (w/o user tracking): The WebKit team just announced a privacy preserving ad attribution system for websites. I want the same thing to work for an ad for an app that appears on the web, App Store, or in another App. No need to attribute to a user — just the ad source is sufficient.

Fine-grained Shortcut integration (apps provide blocks): The Workflow team integrated the x-callback-urls of a bunch of popular apps into blocks — and Shortcuts still has them, but as far as I know, there’s no API for apps to provide small bits of functionality for Shortcuts to use as a building block. Even with the ones they have, the app comes up, does a bunch of stuff and then returns. A more streamlined experience would be nice.

Multi-select image picker: The current UIImagePickerViewController doesn’t support multi-select of photos. If you want to do this, you can build your own VC, but then you need to ask the user permission to their entire photo library in order to show them the photos. Since iOS 11, you have been able to bring up a picker without permission since it runs out-of-process and doesn’t give your app any access to the photos–just the one the user picked.

SwiftFest

I will be speaking about my experience with RxSwift at SwiftFest 2019 in Boston on July 29-30. Last year, I spoke there about how to sketch iOS UIs in Playgrounds — unfortunately the talks are not available online, but I’ll be putting together a video shortly that covers the material I spoke about.

I highly recommend this conference — it’s two-track and has about 300 attendees. I went to talks every chance I got and learned a ton. It will also be a good time to discuss the ramifications of WWDC as we’ll all have add a couple of months to absorb iOS 13.

If you are going to be there, contact me here or on twitter.

App-o-Mat updates

I started App-o-Mat as an iOS tutorial site back when I was consulting. It mostly had cordova screencasts.  I’m going to be doing more writing about iOS there (native and possibly cordova-based).

You can subscribe to the mailing list there if you want to get updates. If you have requests for topics to write about, let me know.

Here are the latest posts:

How do I pass values from a VC back to the VC that presented it?

Ok, so you have a view controller that brings up another view controller. Let’s call the first one FirstVC and the second one SecondVC. FirstVC either presents SecondVC or there is some segue that it uses to bring it up.

How do you keep Storyboards from causing merge problems later?

There’s this myth in the iOS community that “professional” iOS developers never use Interface Builder. It’s meant to imply that coding your interfaces is always better, and if you don’t do it, you are somehow less of a programmer. The myth perpetuates the idea that IB is a crutch, a toy, something that only newbies use.

I call BS.

How do you pass values to a VC in a segue?

A theme I see a lot on StackOverflow is a developer makes a View Controller that collects some information from a user and wants to use it on a VC that they bring up in a segue.

 

Self Control

Since my computer is factory equipment, I consider its ability to show me news and social media a defect. One easy fix is to edit /etc/hosts to block these sites, but that’s reversible by just re-editing it. A year ago I found an app, SelfControl, that takes these edits out of my hands.

To set it up, you give it a list of blocked sites. Then, when you start it, it will put entries into /etc/hosts that sets their IP addresses to 0.0.0.0. If you remove these entries, it will keep reapplying them. And since it asks for privileges, it can do this in a complex way. You could thwart it if you wanted, but it’s enough of a pain that you probably won’t bother.

After using it for a while I added a few practices that make it more useful.

  1. I use the Due app on my iPhone (and Watch) for simple recurring reminders. I set up a morning reminder to restart SelfControl.
  2. I went into my /etc/hosts and made a copy of the SelfControl section (it’s clearly marked with comments) and made it a permanent part of my hosts file. I italicized permanent because I can edit this part, but it’s there to be a little bit of a deterrent if I try to go to any of these sites in a non-blackout period.
  3. At the end of the week, RescueTime sends me an email with a summary of my productivity. I can easily see if any new distracting sites are taking significant time and add them to SelfControl.
  4. I found an app for iPhone called Zero Willpower that does the best it can to replicate SelfControl on the iPhone. It’s essentially a content-blocker that you can edit and a timer you can set to disallow deleting. On the iPhone there is nothing they can do to stop you from removing the app or disabling its content blocking privileges, so thwarting it is easy if you want. Again, it’s enough of a pain, that it’s enough to keep me off distracting sites.

Introducing 3D-o-Mat

3D-o-Mat is a simple app that creates the type of 3D photos that you view with red/cyan glasses.

I have been writing apps that do this for a while. It was one of the first things I wrote with DotImage back when I joined Atalasoft in 2006 and ported their image processing commands to WPF. Then, I wrote a simple version for iOS that I showed to middle-schoolers when I was a volunteer for DIGITS.

I was recently invited to speak at a Smith College Python programming summer program for HS girls and I decided to make this app more real.

PS: here’s a tweet sized version of the app in Python that I shared with the class the last time I spoke:

This gist shows a better way to do it that preserves the color in the original photos.

GamePlayKit Rule Systems on Smashing

I wrote a 2-part series on GamePlayKit’s Rule Systems framework for Smashing Magazine.

Part 1 is the basic idea and shows how to replace conditional logic that might be strewn around a project into a GamePlayKit rule-system.

In Part 2, I show the support for fuzzy logic rule-systems (logic values ranging from 0.0 to 1.0 instead of strictly true and false). It covers a little more of the features of rule-systems and how to implement NOT, OR, and AND for fuzzy values.

Both articles are supported by Swift Playgrounds in GitHub so that you can play with the concept and try different rules.

NerdSummit 2017 Talk: Introduction to iOS Development through Apps

On March 18th, I’ll be giving a presentation to teach iOS development by looking at completed apps and customizing them.

If you are planning to attend and want help after the talk to set up your machine and get started on the exercises, here’s what you’ll need:

  1. To do the exercises, you need a Mac with Xcode 8.2+ installed. If you don’t have access to a Mac, I think we’ll have enough people with one and can pair you with someone.
  2. We’re going to be forking apps on GitHub, so having a GitHub account already would be good.
  3. You don’t need a device — we’ll be able to use the simulator for all of the examples, but if you want help getting apps on devices, sign up for a free Apple Developer account.

It’s a beginner talk, so anybody with an interest in programming will get something out of it. It will help if you have some programming experience (in any language).

Here’s the plan

  1. Basic Swift (enough to be able to read the apps)
  2. The MVC pattern as implemented in UIKit
  3. Interface Builder (connecting outlets and actions)
  4. Then, we’ll fork an app and make some customizations
  5. Based on the group’s questions, we’ll cover as much iOS Development and Swift as we need.

The idea is that the apps we’ll fork are generally useful apps that people might want a custom version of. All of the code is open-source, and you’ll be able to continue to develop them after the workshop if you wish and release them to the App Store.

I’ll introduce the apps in subsequent blog posts here (I have to make them).

There will be handouts so you can work on your own after the talk.