UIKit for Mac

mar·zi·pan
[mahr-zuh-pan]
noun: marzipan

  • a sweet, yellowish paste of ground almonds, sugar, and egg whites, often colored and used to make small cakes or confections or as an icing for larger cakes.
  • a new Apple Framework for building Mac and iOS Apps from the same source code.

A unified Apple Framework makes sense. By this time AppKit is fairly old, it began life at NeXT and moved forward as Apple’s new framework on macOS. When Apple created iOS it made sense to reconsider the user interface and user experience for a touch based interface. Having support for mouse clicks and menus didn’t make a lot of sense for something so small controlled with your finger. Enter UIKit.

To say iOS became a shooting star, Apple’s crowning achievement, would be an understatement. It’s wildly popular amongst users and developers alike. So much so Apple has kind of pushed macOS into the background and allowed its younger brother to take center state. It’s not that macOS isn’t popular — because it is — it’s just that iOS is much, much, bigger than anyone could’ve estimated. As a result Apple spends most of its time working on iOS, or at least it seems that way.

In the episode Marzipan: Apple’s Next Big Software Thing! of Rene Ritchie’s VECTOR he discusses Marzipan with a lot of well known developers and writers. None of the folks go as far to think Apple could be making a monumental leap forward with Marzipan. What if Apple goes all in on a brand new framework completely written in Swift? I know it’s not likely to happen, but what if it does?

Obviously that would be hugely upsetting for the Mac and iOS ecosystem. But on the flip side it would give developers a clean slate to work with. Something designed to work for touch and mouse and keyboard input. It would give Apple the chance to shake off years cruft and reimagine applications and frameworks without the constraints imposed by Cocoa or Cocoa Touch.

Am I crazy? Yes, a little. I know current developers — especially Mac developers — would lose their minds. It would be the second time Apple changed direction on them in a potentially radical way. This wouldn’t be quite so egregious. The move from Mac OS 9 to Mac OSX was monumental. A brand new OS and a brand new way to code, not easy to adjust to after years of working with an OS and API. Carbon eased folks into it, but the transition was still extremely difficult for some development shops, like Adobe.

Duct tape. Fixer of all thingsOf course they don’t have to go all in. I doubt they’d be that extreme. There are simple things they could do to unify Cocoa and Cocoa Touch. An extremely simple example I can think of is unifying NSColor and UIColor. Over time we’ve seen some text attributes move to their NS* counterparts, why not start with the simple things and work down the stack?

I also don’t consider going from iOS to macOS cross platform. I know they’re slightly different but they are in the same family. If you’re doing iOS development macOS should feel somewhat familiar to you. Sure the controls are different on the platforms and there’s the matter of touch vs. mouse driven, but I believe calling Cocoa based applications cross platform between Mac and iOS is a bit of a stretch. If you’re taking one set of code from iOS to Windows that is what I’d consider cross platform.

Post WWDC 2018 Thoughts

Eat your own dog food.I penned everything above quite a while back, March 11, 2018 to be exact.

While on stage at WWDC Apple announced UIKit for Mac. Four UIKit for Mac applications will ship with macOS Mojave this fall; News, Stocks, Home, and Voice Memos. This is great news for anyone interested in bringing their own iOS Applications to macOS. It means Apple is dogfooding UIKit for Mac while it’s in active development. From all reports it’s really rough around the edges but we can all hope some of those edges are smoothed out before Mojave makes its debut but it’s ok if the applications and framework are a bit rough at first. Why? Apple said on stage UIKit for Mac wouldn’t be generally available until 2019 and that it was a multiyear project. This tells me we should expect a gradual move of UIKit downward into AppKit until UIKit either becomes a part of AppKit architecturally or the Mac specific bits of AppKit become a part of the “new” UIKit for Mac.

In many ways it feels like UIKit for Mac is the right direction. It’s been running on macOS for 10 years. If you’re a developer you’ve used the Simulator everyday to run your iOS Apps on your development machine.

UIAlertController
Definitely not what you want to see on your Mac

Any developer will tell you shipping software is difficult, especially if you’re driven by deadlines and not feature sets. Given Apple have already announced four applications shipping with Mojave they’re going to have to make really tough decisions to make sure these select applications are ready by fall. It seems reasonable to expect these first UIKit on Mac applications will have a decidedly wonky feel, not quite native. There will be telltale signs, little things, that drive native app seeking people crazy. Things like seeing a UIAlertController instead of an NSAlert when an app needs to inform you of something or ask a question. It makes the application feel unnatural.

 

Getting an error on your Mac can be frightening but at least this alert feels like it belongs on the platform.

At the beginning I’d expect UIKit for Mac to either reach down into AppKit to do the work or reach under the hood and use the same lower levels AppKit uses. Conceptually this is how UIKit living on top of AppKit looks. It’s a way to bootstrap your new Framework into being. Leveraging what AppKit already does seems a reasonable way to just make it work.

UIKit living off of AppKit like some kind of digital vampire.

As time goes by I would expect more of AppKit to move upward into UIKit. UIKit becomes the new preferred framework for building applications on Mac. Maybe it gets a new name? Maybe not? As that transformation begins taking shape we’ll see UIKit itself transform to feel native on each platform. Mac apps will feel like Mac apps and iOS Apps will feel like iOS Apps. It’s not rocket science. Applications for each OS should feel like they belong. No compromises. Hell, we can write Electron Apps if we want compromise.

UIKit consumes the heart and soul of AppKit becoming the ultimate application development platform for Mac and iOS Apps.

As Craig Federighi pointed out on stage at WWDC this is a multiyear effort. Expect things to be ugly at times from the user perspective and the developer perspective. In fact I expect it to be the development effort going forward for iOS and Mac UI Frameworks. Until — of course — the next shiny framework comes along.

Help with Hugo

A wonderful boquet of flowers.A couple weeks back my WordPress weblog started doing funny things. Apparently someone was able to gain access to it via my Jetpack login and install a bitcoin mining service. Joy.

When you’d visit my site you’d occasionally get booted to another site, typically one that wasn’t nice, but on occasion it was what appeared to be a nice weblog. I’m not sure who’s it was but it wasn’t wanted.

So I disabled the site and put up a temporary placeholder page while I figured out what to do about it. This is the second time I’ve had to make changes because my WordPress site was broken into. It makes having a blog a lot less fun when idiots break you stuff.

I decided I’d install Hugo and figure out how to use it to automagically post on my server. I found a nice page documenting how to use git with git triggers to publish a Hugo based weblog and went about trying it out. It works fine, but there is something I can’t figure out.

When publishing I would like to have my front page contain some number of blog posts with permalinks to those posts. E.G. Clicking on the title would take you to a URL like

https://iam.fahrni.me/2018/01/08/2017-iphone-homescreen/

. Notice the yyyy/mm/dd format in the URL. I want that exact thing for my Hugo pages so I can import what I already have and not mess up links to my existing posts. Hugo looks like it can do this, but there’s one thing that bugs me and I haven’t been able to figure it out.

When you click on the permalink it displays a URL like the one above but the file doesn’t actually exist at that location. It must use some JavaScript to do the work, I guess? I have no clue because I don’t grok how web pages and JavaScript really operate.

Can someone please let me know if Hugo can generate a standalone HTML file and drop it into a directory with yyyy/mm/dd format so I can maintain what I already have? If I can do that I’m all in with Hugo. Otherwise it’s off to find a fully baked blogging system that can do what I want.

Up and running

I got my site back up and running last night. I’m still on WordPress because I still have questions about how Hugo works and until I get those answered I’m keeping the site the way it is.

To get back online I deleted my WordPress installation and started fresh. I was able to plug in the database information during installation and use my existing stuff. No fuss, no muss.

There is one strange thing going on. Some of my posts have had the apostrophe replaced with what looks to be encoded representations. It’s weird and I’ve fixed up a few.

This time around I didn’t install a bunch of plugins and the site is super quick. No Jetpack, no caching, nothing. Just a couple small plugins that come with the installation. That’s it.

I’m also using a WordPress default template for now because it works.

I still hope to move to Hugo but I need to get some questions answered first. More later.

Rob’s 2018 Summer Blockbuster Must See List

It’s that time of the year, we’re on the eve of Summer Blockbuster Season.

Here’s my list for 2018. Enjoy.

Avengers: Infinity War April 27
Dark Crimes May 11
Deadpool 2 May 18
Solo: A Star Wars Story May 25
Ocean’s 8 June 08
Hereditary June 08
Incredibles 2 June 15
Jurassic World: Fallen Kingdom
June 22
First Reformed June 22
Sicario 2: Soldado June 29
The First Purge July 04
The Equalizer 2 July 20
Hot Summer Nights July 27
The Spy Who Dumped Me August 03
The Darkest Minds September 14

Hot buttered popcorn and a movie, ahhh!Looks like a decent Blockbuster Season. I never get to all the movies I’d like to see, but this year I may try to do it because I’m now a MoviePass Member.

My short list includes Avengers: Infinity War, Deadpool 2, Solo: A Star Wars Story, Ocean’s 8, Incredibles 2, and Sicario 2: Soldado.

See you at the movies! Remember to get popcorn with extra butter and an extra large soda!

Past Must See Lists, plus 2009 from my original weblog.

I’m a Professional Developer

On episode 268: A Tarnished Brass Age the ATP boys talk about the rumor of Macs moving to ARM and away from Intel chips.

If Apple does go this route I can only see one possible candidate for the switch: the 12in MacBook.

The 13in and 15in MacBook Pros could be a mistake to convert for all the reasons John outlines on the show. Most of the developers I work with at Agrian use 15in MacBook Pros for development. Most are backend developers. We don’t use desktop computers.

What kind of development do we do? Well, the backend is a mix of Ruby (RoR), Scala, a little .Net, and some Rust. On the client side we have a browser based application written in JavaScript on Ember and our iOS App is a mix of Swift, Objective-C, a small amount of C++, and a new library written in Rust that’s shared with the backend team. Basically our tools run the gamut.

I maintain two of our old .Net services so I run VirtualBox with Windows 10 and Visual Studio 2017 in addition to Xcode for iOS App development and all my other Mac tools; multiple terminal windows, SourceTree, Evernote, Slack, and BBEdit as well as multiple tabs open in Safari. Yeah, there’s a lot going on and my MacBook Pro handles it without batting an eye.

Add the MacBook Pro to the list of devices Apple needs to keep in mind when it comes to Pro users. Not all Pros use desktop computers.

It’s worth noting I’m still using the 2014 MacBook Pro I was given when I started work at Agrian. I recently opened it up and replaced the 256GB SSD with a 1TB model. It works great. I’m not sure I could do that with a modern MacBook Pro.

The new 9.7-inch iPad and Ag

I know the latest Apple event was focused on Education, but anyone using the iPad as tool outside of the technology world will benefit.

I work for a small company called Agrian that builds software and services for Agronomists. You may think that just a fancy word for farmers but it’s a lot more than that in this day and age.

Agrian iPad Scouting
Agrian iPad Scouting

Large farming organizations and crop retailers may have hundreds of employees working out in the field. They do everything from collecting soil samples to scouting crops to baiting and trapping for critters. When they’re out in the field they can use our software for any one of these jobs, and it’s best used on an iPad.

At one point we recommended purchasing iPad Mini’s because it was the best bang for the buck. With the introduction of the new 9.7-inch iPad we can start recommending that device. It’s not that $329 is cheap, but it sure beats the price of the Pro models and it’s plenty powerful enough for use with our software.

It’s a real winner.

MADNESS!

New York Times: “A No. 16 seed had never beaten a No. 1 seed in the N.C.A.A. men’s basketball tournament.”

Are you watching BCS, FBS, or whatever name you go by today? I know you have your little tournament to decide a National Champion but it’s time to get real. Expand to 16-teams.

What UMBC did to Virginia would be like TCU knocking off Clemson. Think about that for a minute. It’s a big deal.

Bring us a real tournament.

@Gruber and Text Editing on iOS

This is from a July 2017 tweet. You see, I’m working on a blogging/editing tool for Mac, iOS, and Windows and it really caught my eye.

My note:

Today John tweeted that he was looking for a good iOS text editor. He was looking for recommendations because he wasn’t happy with iA Writer, Ulysses, or one other one I can’t remember.

It sounds like he wants Vesper back. That’s very interesting to me. He says they “don’t feel right.” That’s also interesting.

I checked out the apps he mentioned. They’re all beautifully designed. iA Writer looks super interesting as does Ulysses. It’s very difficult to put a finger on what appeals to John. I suppose Vesper is the answer?

A wonderful bouquet of flowers.Ultimately it looks like John is after TextEdit on iOS. Plain Jane — to the point — text editing. Makes sense.

Has anyone created TextEdit for iOS yet?