A Kid in the June 2019 Candy Store

June 2019 has me feeling like a kid in a candy store.

I’m remarkably excited by the variety of things that are catching my interest and attention this month—so much so that I’m finding it difficult to decide what to do next.

A large part of that is due to all of the announcements at WWDC—but that is not all.

The Monday after WWDC, I wrote about an app I want to create that might be easier to build due to new technologies introduced at WWDC. Foremost among them was SwiftUI which I have really enjoyed digging into.

My week following the developer conference was a flurry of watching session videos and digging into things. But WWDC was not the only thing going on in the world in a few weeks back. On May 31st, Star Wars: Galaxy’s Edge opened at Disneyland.

Star Wars: Galaxy’s Edge

As a big Disneyland and Star Wars fan, had it been any other time of year, I would have tried to be there opening weekend. However, just days before WWDC, with a big LIVE near WWDC show to rehearse and prepare for, there was no way I could make it down to Anaheim.

I didn’t have to wait long though. Last weekend I had the chance to visit Galaxy’s Edge at Disneyland. I feel like they’ve done an amazing job of creating a place that feels very much a part of the Star Wars universe, even though it a brand new location not depicted in any of the movies. My inner nine-year old found it very satisfying to fly the Millennium Falcon, build my own lightsaber, and yes, drink some blue milk.

Combine Framework and Foundation

On Monday I headed home from Disneyland as Beta 2 dropped for Xcode 11, iOS 13, macOS 10.15, and all the rest.

The new beta includes Combine framework support for Foundation classes. So, it just became possible to write code to explore the same sort of data publishing pipelines that were presented in the Combine sessions at WWDC. This includes publishing notifications, properties, and timers.

So, another whole aisle of candy just opened up and I’ve spent most of the week catching up from my trip, rewatching Combine videos from WWDC, and playing around with Combine code.

So far, I am feeling the same sort of enjoyment in writing Combine code as I have had writing SwiftUI code. The main area of frustration I am finding with Combine is that the session videos are the primary place to see Combine sample code. (If I am missing a trove of Combine sample code from Apple – please let me know on Micro.blog or Twitter!) So, I’m finding that anything not covered in those sessions takes bit of trial and error to figure out.

Along the same lines, the code in the sessions often show the path from publisher through operators to subscriber, but don’t necessarily talk about who should be holding onto the publisher or the cancelable item returned from the subscriber, or exactly when it makes sense to set them up. It would be great to see more Combine framework sample code from Apple showing it in integrated into an app project, especially traditional UIKit and AppKit apps.

Toy Story 4, Forky, and WALT

Today I put the Combine framework aside for a few hours to go see Toy Story 4. Every time Pixar announces a sequel I worry that this is the one where they will jump the shark in the franchise. I am very happy to say that I really enjoyed Toy Story 4. I found Forky to be absolutely delightful!

If you know me for any length of time, you will soon discover that I am a big fan of Disney and Pixar animation.

WALT app icon
WALT app

The first iOS app I wrote is WALT: Watched Animation List Tracker. It’s not a commercial success by any means, but it’s an something I wanted to have in the world. It lists over 650 short and full length animated films from Disney Animation Studios and Pixar Animation Studios and lets you check off the ones you’ve watched.

Got to check off Toy Story 4 in WALT today.

I wrote about the creation of WALT shortly after I released it back in 2012. (Was that really about seven years ago? Wow!) A heads-up if you are thinking about paying 99 cents for the app, I do intend to make it a free app and add a tip jar. However there are many other things ahead of that on my to-do list, so I can’t tell you exactly when that will happen.

As mentioned in that original article, one inspiration for WALT was the The Walt Disney Family Museum (WDFM) in San Francisco. I have been a member since it opened ten years ago. The location is beautiful, in the Presidio with a view of the Golden Gate Bridge. And I find the museum and the story that it tells to be inspirational.

Fantasia Talk at The Walt Disney Family Museum

In addition to the exhibits at the museum, one of the things I enjoy most are the programs that they have throughout the year. In the past I have seen many great talks that speak to the creative process. For instance last year, I saw Brad Bird speak about his experiences working with classic Disney animators. I’ve seen animators Andreas Dejas and Floyd Norman talk about their time at Disney. And I’ve had the chance to see original Imagineers like Alice Davis and Marty Sklar.

Tomorrow I’ll heading up to San Francisco to see a talk by composer Fabrizio Mancinelli called The Beauty and Legacy of Fantasia. I’ve always enjoyed and been fascinated with the way animation and music can work together to achieve an effect and look forward to hearing what I believe will be an interesting perspective.

That’s A Lot Of Candy

In feeling like a kid in a candy store, June 2019 is not just some quaint little corner candy store. It’s been a giant store with aisle after aisle of classic candies, exotic candies from faraway places, and brand new candies you had never even heard of before.

With all of this intellectual and experiential candy, I hope I do not get the psychological equivalent of a bellyache. But even if I do, it has been a very memorable and enjoyable month so far. •

Getting an app ready for iPhone 5

I was traveling the week between the iPhone 5 announcement and release. I returned from my trip champing at the bit to update my app WALT to use the entire 4-inch display, instead of being stuck in the letterbox ghetto. Updating turned out to be simple and straightforward.  Here’s how it went.

Out of the letterbox

The first step was getting out of the letterbox.  To do this, I upgraded the project to use the iOS 6 SDK and added a new 640 × 1136 launch image for the new screen size. Like all launch images, it needed to have a particular name: Default-568h@2x.png. There’s a lot of information encoded in that file name—the default launch image name, the screen height, the high-resolution size and the image format.

Enabling a feature by adding a specially-named image is a clever and compact approach, but it is not very obvious or discoverable on its own.  Xcode 4.5 helps by displaying a project warning and offering to create the new launch image for you.  (Although I see the warning now in a test project, I don’t remember seeing it when I updated WALT.)

Xcode 4.5 adds a few other features to support development for Retina 4 displays. The iOS Simulator has a new hardware device setting so you can test your app with the new size, even if you haven’t been able to get your hands on an iPhone 5.

When viewing storyboards, Interface Builder makes it very easy to toggle between Retina 3.5 and Retina 4 sizes using a newly-added resize button.

Resize button in Interface Builder

New resize button toggles storyboards between 3.5 and 4-inch views

If you are not using storyboards, Interface Builder still has you covered.  You can change the screen size for a top-level view in the Simulated Metrics section of the attributes inspector. This setting is also available with storyboards, but I have found the single toggle to be much more convenient to use.

Screenshot of simulated metrics options in Interface Builder

Choose which size to work with in a xib

Mostly done already

Since WALT uses standard tab, navigation and table views, there was nothing additional required to effectively use the additional screen space. Each table view became taller and now displays more content. I could have released the app as-is, but wanted to do a few tweaks.

On a Retina 3.5 screen, the film detail view in my app adjusts row heights in certain cases to improve the layout.  I needed to make different adjustments for Retina 4 screens, so I needed to tell the two screen sizes apart.  The new screen size is not a different user interface idiom—just a taller iPhone. For screen size, the highest level API available is to use UIScreen to get the height of the main screen:

 CGFloat mainScreenHeight = [UIScreen mainScreen].bounds.size.height;

I‘ve already seen a number of online examples that use the screen size to add convenience category methods to UIScreen or UIDevice.  In my case, I checked the screen size inline in the one place where it was needed.

Screenshot of the film detail of 'Partysaurus Rex' in the app WALT.

What Up, Fishes?!
The newly added ‘Partysaurus Rex’ looks nice and comfy, all stretched out on a beautiful iPhone 5 in the new version of WALT.

Although my experience was quick and painless, the amount of work needed to adapt an app for 4-inch screens varies greatly depending on its contents.  The iOS Human Interface Guidelines document suggests different approaches for various situations. It also makes a very important point that applies to all apps.  An app should remain the same app, with the same features and interaction, regardless of which screen size it is being displayed on.  But, when displayed on a 4-inch screen, it should reveal more of its content.

In summary, getting your app to stretch out to the full iPhone 5 screen is as easy as updating to the latest SDK and adding a new launch image.  Getting your app to look great, however, will depend on how customized your views are.

For me, I found that getting the app ready for iPhone 5 took less time than preparing the new set of taller screenshots required for the App Store. •

WALT 1.0.1 is available now in the App Store with iPhone 5 and iOS 6 support.