A silly Swift dilemma

18 Sep 2015

I have this side project I’ve been working on in my spare time for the last 14 months or so: a native iOS client for groov.

It grew out of a silly place, actually: we already have an iOS app, it’s a web-view wrapper around our web app. The web app has a menu bar at the top, and so does the iOS app (sometimes), so it looks, well:

Stacked title bars in groov View for iOS

My original thinking was that if we opened up the data in the application a bit, the iOS app could move the web app’s menu bar into its own navigation bar and we wouldn’t look clunky. From there, it was a short step to just opening up all the page stuff so that I could render everything natively:

Side by side: groov View in Safari, groov as a native app

This has been a strictly for fun project: it’s not likely to be ever be greenlit at work as a thing we’ll actively develop. Also note: none of the stuff that’s been added to let this native app work ships inside groov. I just maintain a set of patches in a branch on the side for it.

So here’s my silly dilemma: one of my goals with this has been to continue to support the iPad 1. We don’t support it any longer in groov View for iOS since we started requiring iOS 6.1, but so far I’ve been able to pretty easily keep things working across everything from iOS 5 up through 9. (Multitasking might be tricky though.)

But: I’d really like to start using Swift. I can’t use Swift and still target iOS < 7, so I’ll have to drop support for those first generation iPads. I’m kind of proud at how well it runs on those things though: better than an iPad 2 with iOS 7+, that’s for dang sure.

Dropping everything prior to iOS 8 would make supporting multi-tasking easier, but then my trusty little iPhone 4 wouldn’t be able to run it anymore, and I kind of like the thing.

Silly things to worry about for a side project that’ll never go anywhere, but there you have it.

Bonus: one more silly thing. Safari’s the only web browser that does this, no one would never notice that my groov app doesn’t do it, but man, I really like how Safari deals with descenders when underlining things. Text Kit will do it, but I need to be able to extend the underline well beyond word boundaries, and I haven’t figured out a way to get at the underline metrics yet. That, and Text Kit is only on iOS 7+.

Fancy underlining in Safari