EasyRoute 5.2 – Updated Watch App

EasyRoute 5.2 is now available on the App Store. The main change is that it includes a totally new watch app that looks and behaves very similarly to the old one.

Why a new watch app? Largely because of a technical reason. In short, Apple is prodding us developers along to embrace their newest tech. There is a long story if you’re interested…

When Xcode 14 came out last fall, much of the WatchKit user interface classes were deprecated in favor of SwiftUI and the SwiftUI lifecycle. What this meant was one annoying warning in the EasyRoute project that I couldn’t silence unless I migrated, so I did. The lengths I will go through to keep the project at zero warnings!

It really wasn’t as bad as it sounds. All the all the non-UI code was pretty well separated from the UI in the first place so it was just a matter of making some new view model objects to talk to the existing code and publish values for the SwiftUI parts. Also, watch apps used to have two components, the app, and an extension, but nowadays, it’s just an app.

Finally, the complications have been migrated to SwiftUI as well. They are handled very similarly to the SwiftUI widgets on the phone.

Taken all together, a big change, but it was fun and I got to familiarize myself with a few new concepts.

Finally, there is one known issue, but with a workaround. If you put routes on a schedule, the complications will not update automatically anymore, but will update right after you bring EasyRoute to the screen on the watch. I struggled with this for a while before contacting Apple for help and it turns it is a bug on their end and should be fixed in a watchOS or iOS version soon.

This entry was posted in EasyRoute and tagged . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Both comments and trackbacks are currently closed.