Author's Posts

… Did

Interview for MacFormat about Metal (click)
Craig Grannell (@CraigGrannell on twitter) sent me and a couple of other developers a couple of questions about what we thought Metal would bring to the Mac. I’m very proud his article starts by quoting me:

Try to imagine riding a bike with square wheels. To move, more effort is required than when using ordinary wheels. This is how Eternal Storms Software founder Matthias Gansrigler describes OpenGL [compared to Metal] on the Mac.

It’s my first interview for a print magazine, my second overall (the first being this piece on the german site MacGadget a couple of years ago about OS X 10.5 Leopard).

Took part in the iTunes Affiliate Links Program (click)
I was told a couple of times now that I should set up affiliate links at least on my webpage, and I finally got around to do it. I don’t expect a lot of profit from this, but in this day and age, and as an indie developer, every bit helps. Setup is very easy and quickly done, so if you have a couple of minutes, I suggest you set up affiliate links as well.

Brought my cousin’s iOS game ‘Reach ZEN’ to the new Apple TV (click)
It’s a simple game, so the interface-conversion was done fairly quickly. Most of the APIs used are available on the tvOS as well (with the exception of social APIs – twitter and facebook).
What took the most time, though, was to make sure the game worked naturally, intuitively with the Apple TV Siri Remote.
The Focus Engine takes a little time to get used to and if you don’t use autolayout, you can forget using UIFocusGuide to aid the Focus Engine in finding the next UI element that should be focused.
Most buttons you see in ‘Reach ZEN’ are a custom class to draw the line animation, so making them focusable was fairly easy – changing the color to white if selected or a dark purple if not.
It’s a fun platform to develop for, and I’d like to implement multiplayer into ‘Reach ZEN’ at some point when I have some spare time.
The Apple TV is a very nice platform, I think, and the stuff that’s appeared on its App Store thus far looks very promising.
Anyway, ‘Reach ZEN’ is $0.99 on the App Store – and one download gets you the game for iPhone+iPad+Apple TV. I hope you enjoy – the Apple TV app will be available this or next week 🙂

Wrote about Pairing the Apple TV Siri Remote with the Mac for Testing Purposes (click)
Speaking of the new Apple TV, I figured out how to un-pair the Apple TV Siri Remote from the Apple TV and pair it with the Mac so it can be used in Xcode’s Apple TV Simulator, which is very nice if you’d like to quickly test some stuff locally.

Bought the Magic Trackpad 2 (click)
As soon as Force Touch arrived in the new MacBook, I’ve been wanting to do something with it. However, purchasing a new Mac just for a new Trackpad seemed a little over the top for me, so I kept hoping Apple would release a refreshed Magic Trackpad, which it thankfully did.
It’s a very cool device, it’s much larger than the previous one (I saw a picture online that compared its size to the iPad mini’s screen, and it’s almost identical), easy to the touch, very smooth.
I like the haptic feedback when fast-forwarding or rewinding in QuickTime – that’s just something you need to experience for yourself to really grasp how (r)evolutionary this is. I can’t see myself ever going back to a non-Force-Touch trackpad.
What astounds me is that the revised Magic Mouse didn’t get Force Touch. Just as much as it baffles me that the new Magic Keyboard didn’t get the butterfly mechanism for its keys.
So in an effort to exchange my wired equipment for wireless hardware (mouse and keyboard, primarily) I got my brother’s (old) Magic Mouse (which works just as well as the new one, just with batteries, imho) and I’m planning on purchasing the new Magic Keyboard (or the old one, if there’s a good deal somewhere). I believe I’ll miss the number pad of the USB keyboard, though. It is pretty comfortable.
The new keyboard is pretty close to what I remember the MacBook’s keyboard’s keys felt like – and I liked it (I had a chance to test it at Saturn last week). But it’s not enough to convince me to shell out 50 bucks more.

Force Touch in Yoink (click)
À propos the Magic Trackpad 2, Yoink is the first app of mine that I’d like to make use of Force Touch. In what turned out to be an odyssey of a couple of weeks, I finally found out how to receive Force Touch events from an NSTableView (something that – one would think – would be easy to do, but it’s surprisingly convoluted and opaque).
In Yoink, force touching on a file will select all files to allow for easily dragging them all out at once. For now, a double-click with the option key pressed could be used, but I think Force Touch will feel more natural.
I’m also experimenting with haptic feedback, that you feel something when your drag enters Yoink’s window. I’m not convinced completely yet, but perhaps it will be an option soon.

Updated ScreenFloat to v5.1.12 (click)
As a minor update, it fixes a potential crashing bug when opening the Shots Browser, incorporates the new About panel and adds the ability to quickly create a new shot from the menu not having to dig down to the submenu but clicking on the containing menu item instead. It’s a minor thing, but it makes it a little bit faster to take a shot when not using the keyboard shortcut.
For version 2.0, naturally, with a new device like the Magic Trackpad 2, a lot of use cases come to mind, but that’s still a little time off. Plus, Force Touch is no where near being a mainstream input possibility, so that’s always something to keep in mind. In a couple of years, sure, everyone will have it, but right now, it’s very, very ‘niche’.

Coffee Machine with FrotherBought a new coffee machine
After my coffee maker bit the dust right after it’s warranty expired, I had to get a new one, and this time, with a milk frother. It’s coffee 2.0 – so good. Makes me feel like I lived in the dark ages before.

… Downloaded

OS X El Capitan IconOS X 10.11 El Capitan (click)
I don’t understand why Apple’s new version of OS X currently holds an average rating of 2½ stars – that seems very low to me.
To me, this update has been nothing but a breath of fresh air and brought new life into my retina MacBook Pro from 2012. The UI is much smoother (in Yosemite, three windows open and Mission Control would lose frames any place it could).

Plex IconPlex (click)
A natural addition to the new Apple TV. Be sure to get it.

Lara Croft GO IconLara Croft GO (click)
A marvellous puzzle-platforming-game, very nicely executed. Would be interesting to see it on the Apple TV, but for now, it’ll have to do on the iPad (which is also very nice, by the way). When I first downloaded it, I played an hour straight and had a hard time putting it down.

Beach Buggy Racing IconBeach Buggy Racing (click)
Something to test the new Apple Siri Remote with and it’s just plain fun, though controlling with the remote’s tilt-control took me a while to get used to (I also never got used to tilt-controls on the iPhone or iPad – I always switched to button controls where available). For some reason, on the Apple TV, it works better for me. Probably because the screen doesn’t turn with me turning the remote. That’s what always bugged me with tilt-controls.

… Read 

This time without a synopsis on my part as I’m pressed for time – my apologies. But the titles give you the gist of it anyway.

Why Apple Is Still Sweating The Details on iMac (click)

Lessons Learned with 3D Touch (click)

How Pixar Changed All The Rules To Make The Good Dinosaur (click)

Perfect Smooth Scrolling in UITableViews (click)

On Apple’s Incredible Platform Advantage (click)

Apple TV, iPhone, iPad: Best Controllers (click)

… Watched

It’s been a busy month, movie-wise. A lot of interesting new movies came out this month here in Austria and my girlfriend and I were trying hard to catch up 😉 And it’s not over yet – The Hunger Games Finale, The Good Dinosaur, Star Wars… Pretty busy this year.

Inside Out PosterInside Out
Another Pixar masterpiece. My favorite remains Monsters, Inc. for now, but Inside Out makes for a good second, maybe third place in my personal ranking. They do try to make you cry a little too hard at the end there, but it’s a movie about emotions, so that’s to be expected. The imagery is amazing and the cast does an amazing job voicing Joy, Fear, Disgust, Anger and Sadness.
I’m wondering what took them so long to release it in Austria, though. Usually, these movies are released worldwide at the same time. They seem to be able to do it with The Good Dinosaur… Weird.

Crimson PeakCrimson Peak
An OK movie with a story not strong enough to really hold my interest. The cinematography and sets were amazing, though. A lot to see, for sure.

The Visit PosterThe Visit
M. Night Shyamalan is back, with a great, pretty scary movie. And it wouldn’t be a Shyamalan movie without a twist. What it is? Go see yourself 😉

Paranormal Activity-The Ghost Dimension PosterParanormal Activity – The Ghost Dimension
The thing about the Paranormal Activity movies that made cold sweat running down my skin was you never really got to see what actually haunted people. This changes in this (apparently final) movie of the series and takes away a certain je-ne-sais-quoi. It’s still scary, but not as primal-scary as the first couple of movies. Nevertheless, it’s a good conclusion to the series.

A Developer’s Honest Take on His Team’s Failure (click)
Remember that game that would end after a certain amount of people died in-game? Hear what went wrong, and what went right.

… Ate

WokWok

Coffee Latte MacchiatoYum. Just sayin’

Read more

After having spent over a (completely fruitless) month on fiddling with this without having an actual Force Touch Trackpad to test with, having gotten one recently, it still was insanely difficult for me to finally figure out how to receive Force Touch events from an NSTableView. But I finally did it. Here’s how.

Apple Keynote - MacBook Force TouchImage Credit: Apple, Inc.

The Premise

In Yoink, the usual way to select all files (pressing ⌘-A like you would in almost any application) is not a viable option. Yoink is written to not have key focus, as it would otherwise interfere with work in other applications too much (believe me, I’ve tried).
So I had to come up with a different way to do it. What I’ve done up until now is to allow the user to hold down the option (⌥) key on the keyboard and double-clicking onto any file in Yoink to select all files.

When Force Touch was introduced, I thought that would be a very nice alternative to option-double-clicking. And it is. Once I got it working, anyway.

The Issue

What I thought would be the easiest way to get Force Touch events from an NSTableView was to override – (void)pressureChangeWithEvent:(NSEvent *)theEvent.
Only that it doesn’t get called as it would normally be called: continuously, after – (void)mouseDown:(NSEvent *)theEvent, with every change of pressure on the trackpad.

No, in an NSView-based NSTableView (I haven’t tested cell-based tableViews), -pressureChangeWithEvent: gets called at -mouseDown: with a pressure of 0.0, and then just “dies”, not getting called again until the next -mouseDown:.
That’s interesting. And there’s more interesting-ness going on.

Once I override the tableView’s -mouseDown:, -pressureChangeWithEvent: suddenly gets called continuously, as you’d expect. So something apparently happens inside the tableView’s -mouseDown: implementation that sort of prevents -pressureChangeWithEvent: from getting called.

Finding A Solution

Knowing that the table view’s default implementation of -mouseDown: somehow interferes with the easy way of using -pressureChangeWithEvent:, my first attempt at a solution was to override -mouseDown: and re-implement its functionality myself, because then I would receive -pressureChangeWithEvent: properly. Then it dawned on me what I was in for. Dragging something out of the tableView (something kind of essential in Yoink) suddenly didn’t work anymore. I’d have to re-implement the selection mechanism (selecting with a mouse click, de-selecting with the command key pressed, adding an additional selection with either the shift- or the command key, etc.)
That alone would have taken more time than the entire feature of having force-click-to-select-all is worth.

Next, I thought NSGestureRecognizer could work. I created a subclass of it that overrides -pressureChangeWithEvent: and checked to see if it was called. But it was the same thing all over again. Adding it to the tableView, the NSTableRowView, the NSTableCellView and the underlying contentView of NSWindow, trying to figure out if they maybe swallowed the method call yielded no result or any change. It was all the same. It got called at the first -mouseDown: call, but then stopped.

Next I tried a local NSEvent monitor thinking it might do the trick, and it works, but only when the window’s contentView is force clicked, not the tableView. A global monitor doesn’t seem to work with pressure events.

So the only way that seemed to get me anywhere at all was to override NSTableView’s -mouseDown:. And that’s what I ended up doing. At first. After a day’s work, though, it still didn’t yield any results what-so-ever. The amount of time I’ve wasted on this is astounding, but apparently, when you keep going and really want to get somewhere, you eventually will.

The Solution

In OS X 10.10 Yosemite, Apple introduced a new NSEvent-tracking API in NSWindow: – (void)trackEventsMatchingMask:(NSEventMask)mask timeout:(NSTimeInterval)timeout mode:(NSString *)mode handler:(void(^)(NSEvent *event, BOOL *stop))trackingHandler that lets you, in a tracking loop, monitor for events matching the mask you provide, in this case, NSEventMaskPressure.

I actually had played around with this before, coming recommended from Markus Müller (@fafner on twitter), developer of the marvellous Mac and iOS app MindNode, who, by the way, in order for me to be able to test this stuff before I got my own Force Touch-able Trackpad, kindly invited me to their office to use his MacBook – thank you, Markus.
However, I didn’t get very far, as I didn’t know how to use the API correctly. Calling it from – (void)awakeFromNib, for example, isn’t the best idea, as it a) doesn’t appear to be able to track anything and b) locks up the app. It has to be called from inside a tracking loop (like -mouseDown: or -pressureChangeWithEvent:).

Again, after a lot of time wasted getting nowhere, this is the solution I came up with:

Source Code for how to receive Force Touch events from an NSTableView

I decided to imitate NSTableView’s -action and -doubleAction methods for handling receiving force touch events in a target.
NSTableView can be set up with a -target that should receive the selectors set in -action-doubleAction, and with this, -forceTouchAction, as seen in the code above, uses the same approach – send the specified selector to the NSTableView’s -target.

This code starts tracking Pressure-, Drag- and Mouse Up events in -pressureChangeWithEvent:, and practically waits until the Pressure event’s stage 2 is reached, which is a force touch. Then it sends the -forceTouchAction to -target.

The important lesson that I learned here is that the events have to be forwarded to the window, as they’re intercepted. So calling [self.window postEvent:event atStart:NO]; is imperative.

I watch for NSLeftMouseUp and NSLeftMouseDragged because I need to be able to stop tracking at some point, and mouseUp and mouseDragged are the perfect moments to do that.

Sample Project

I’ve uploaded a quick sample project to my server which you can download here. It requires OS X 10.10.3 (because of the APIs used). I’ve only tested it On 10.11 El Capitan, though, so your mileage may vary.

I hope this sample code is useful to you and saves you all the headaches I’ve experienced (and a lot of time) figuring this stuff out. Maybe I’m not smart enough. Or maybe this is harder than it should be. I dream of a time where the Force Touch APIs on OS X get the loving treatment 3D Touch enjoys on iOS 😉

Read more

In the latest Xcode beta (currently, 7.1 beta 2), I noticed this in its Release Notes (login required) :

(…)Developers running on Yosemite will not be able to pair the Apple TV Remote with the tvOS Simulator Runtime. (…)

That implies that it’s somehow possible to pair the Apple TV Remote with a Mac running OS X 10.11 El Capitan – but how? There’s no explanation anywhere to be found.

Un-pair the Apple TV Remote

If you’ve already paired your Apple TV Remote with your Apple TV Developer Kit, you won’t be able to pair it with your Mac – you’ll have to un-pair it first.

Remote and interaction remote 2xOriginal Image Credit: Apple Inc., markup mine.

A response to this forum threadon the Apple Developer Forums lead me to how to do it: Hold down the Menu and Volume-Up keys on your Apple TV Remote for about 5 seconds, perhaps a little longer, and the Remote’s pairing will be reset.

Pair it with your Mac

Launch System Preferences and click on Bluetooth. In there, you’ll see something like this:

Screenshot of System Preferences 05 10 2015 17 37 23The Apple TV Remote in System Preferences / Bluetooth.

Click on Pair to pair the Apple TV Remote with your Mac. There should be a spinning wheel for a couple of seconds after which it should be paired.

Ready to Rock

Now the Xcode tvOS Simulator automatically recognizes the paired Apple TV Remote and should respond to anything you do on it. Enjoy 🙂

Update (October 6th, 2015) – Media Control?

Oliver Drobnik (@Cocoanetics on twitter) was interested in what kind of Bluetooth profiles the Apple Developer Kit Remote supports – for example, the Media Control profile to be able to adjust volume, play/pause, etc) – or if it can only be used in Xcode’s Simulator.
He suggested I use the free Bluetooth Scanner App LightBlue to see what profiles it supports.
According to the app and this Apple website that lists the service names, the profiles supported are Battery Service, Bond Management, Device Info and a custom Apple service – so no media control for now.
But thanks to Oliver, now we know.

Read more

This exciting installment of “What I…” features a mysterious Apple TV Developer Kit and an amazing city trip to Zurich.

… Did

Yoink IconUpdated Yoink to Version 3.1 (click)
Yoink 3.1 brings many new languages (like Simplified Chinese and Japanese, among others), performance improvements (like when waiting for so-called promised drags) and energy usage improvements (for example, Yoink doesn’t try to create QuickLook previews for folders and apps anymore as they are just icons anyway. It’s a minor thing, but it can add up), as well as several bug fixes.
I highly recommend updating if you haven’t already – it’s a free update for existing customers of the app.

Apple TV Developer Kit Box

Received an Apple TV Developer Kit (click)
Yes, I was one of the lucky ones to be chosen to receive an Apple TV Developer Kit. I’d like to know how the “choosing process” works inside Apple. Was there a contingent of Apple TV Developer Kits per country and the lucky ones were chosen per country as well or was it just a global “lottery”. I wasn’t lucky enough to be able to go to WWDC this year (because I didn’t win the lottery), but I’m very happy and glad it worked this time. I’m not supposed to show or talk about it, but I can say I do like it (<disclaimer>this is not a review</disclaimer>).
My cousin and I released an iOS game last year, Reach ZEN, and I’m currently looking into bringing it onto the Apple TV platform. It’s been pretty easy so far and I’ll be sure to post about it soon.

ScreenFloat IconWorked on ScreenFloat 2.0 (click)
I’ve been working on ScreenFloat 2.0, particularly currently the layout of the floating shots. I’m not very keen on the widgets that currently appear when you mouse over a floating shot, I’d like to change that up a bit and make it less gimicky-looking. I’ve also started doing some prototyping on possible annotations. Looking good so far, but at this point, I can not share any more. I hope I’ll be able to, soon.

Collecting Photos of my late Dad
In November 2013, my dad passed away at 63. He was a well-known and respected journalist here in Austria (working for KathPress, Die Furche, Das WirtschaftsBlatt and Kurierlogistik.kurier) and I thought it would be a good idea to make the round through their offices and see if they had any photos of him I wasn’t in possession of.
They were all very accommodating, however, I only found very few photos, I thought they had more.
I also drove to our old house in Burgenland (the country-side of Austria) which doesn’t belong to us anymore, but the new owner was kind enough to hold on to some personal objects of ours, which contained family trees, a couple of photographs and, most interestingly, letters from the battlefield (of WWII) of my granddad’s brother. I’m now in the process of digitizing them – I never knew they existed. We did have letters from my granddad, but not from his brother.

… Downloaded

Seabeard App IconSeabeard for iPad (click)
This is a pretty, fun and highly addictive game. I’ve already spent way too much time with it, and I’ve only had it for a week.
You’re a seafarer trying to rebuild your destroyed island. It has some Zelda elements to it, which by itself makes it a winner in my book.

… Read

Apple Pencil vs. Wacom Cintiq (click)
A blog post by Linda Dong (an Apple employee currently on a year off for personal projects) about the iPad Pro and Apple Pencil vs. the Wacom Cintiq. Very insightful coming from a person who uses this stuff every day for work and probably for personal stuff as well, but perhaps a little biased since she worked on it as well. Still, worth a read and definitely an opinion that can be trusted _because_ she uses it daily.

Pixar in a Box | Khan Academy (click)
An introduction to how things work behind the scenes at Pixar. Very interesting.

In Their Own Words: An Oral History Of Diablo II (click)
A very detailed read of how Diablo II came to be with the guys who made it. You’ll need some time to read this 😉

How Apple Built 3D Touch (click)
Just goes to show that nothing at Apple is done on a whim.

How Apple’s New Retina Flash – 5 Years In The Making – Brightens Up Selfies (click)
Another example.

Trials and Upgrades Won’t Save Independent Software Developers (click)
I’m not sure I agree with what Elia has to say, but he does offer some interesting alternatives.

We Own You: Confessions of a Free-To-Play Producer (click)
Shocking how much information about a person can be out there and fairly easily accessed.

… Watched

Supernatural Season 1 DVD CoverSupernatural (click)
My girlfriend turned me onto this show and it’s pretty great. We’ve blasted through season 1-3 already and just can not stop watching. If you’re into demon hunters and the like, give this show a try, you won’t regret it.

… Ate

Baked CroissantsBaked Croissants

… Went to See

My girlfriend Britta and I spontaneously decided to take a trip to Zurich over the weekend, and boy, was it awesome. A great city and very friendly people all around.
We hardly used any public transportation and walked through all of Zurich over the course of three days, including both Rigiblick and Uetliberg. 68.312 steps later, we were back in Vienna (by plane, not by foot :P).

View from GrossmuensterView of Zurich and Zurich Lake from Grossmünster.

View from UetlibergMy girlfriend and I, with a grand view of Zurich and Zurich Lake from Uetliberg.

Read more