Course Correction

Last night, Ionide stopped parsing my project files correctly, which completely killed code completion. That was frustrating, since I was getting ready to start working on the document browser portion of the app. As much as I had wanted to do it in F#, I decided to save myself the grief and go with Swift instead.

Getting Swift going was pretty easy, incredibly easy in fact since there was a template that provided what I wanted out of the box, but there were a few complications with dependencies. I want to use Fluent on top of SQLite for my documents, much like I was going to use EF Core before. I also want to use the Vapor’s DI framework, Service. This presented a problem since those are only available via Swift Package Manager.

When I explored Vapor earlier this year, I found generating and regenerating Xcode projects really painful. To be fair, I wasn’t aware that I could provide an xcconfig to override the default target SDK (from 10.10 to 10.13). Fortunately, there’s another approach that works well. The idea is to generate a “Dependencies” Xcode project that one references from the iOS project. Someone also wrote a script to fix up the project to compile correctly for iOS.

After fuzting around with it a bit, I got my app back to where it was. I’m not happy about having lost a few days of development time, but I think I will be better off working with Apple’s preferred toolset. As a bonus, took the opportunity to check out Tower, which I ended up purchasing.

The change to a subscription model appears to be controversial, but I don’t mind paying for good tools. Tower’s workflow for interactive rebasing is very slick. I make pretty heavy use of history rewriting and topic branches when I use git, so something to make that workflow go even easier is very nice. I quite like being able to select a couple of commits and squash them down. Obviously, I could (and did) do that using rebase -i on the command-line, but this is so much easier.

I’m hoping this weekend I can get my app reading and writing files. I’m not exactly sure how I’m going to make my model work with UIDocument. I’m not using Core Data, so I can’t use UIManagedDocument. Anyway, that’s a problem that will be solved in due time.