Voskhod instruments by Tom Royal on Flickr
Valentina Tereshkova with Vostok 6 by Tom Royal on Flickr
Voskhod Capsule by Tom Royal on Flickr
Chartwell by Tom Royal on Flickr
Chartwell by Tom Royal on Flickr
Heron by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr

You're using a very old version of Internet Explorer which can't show the photos that should be in this box. Please consider upgrading to a newer version of IE or an alternative such as Firefox. Thanks.

App Preview Videos for Newsstand

October 30th, 2014

If you’re promoting an interactive magazine – and if you’re putting a magazine on a tablet, it really should be interactive – nothing really shows it off like a video, so we’ve been producing preview videos of our apps, like the one above, for some time. But with iOS8 comes the new option to embed a video right into your store listing, and a few people have asked how to do that – so here’s a quick guide based on our experiments at Apptitude Media.

A few notes up front:

1) You need a Mac running Yosemite*

2) In our experience, the app preview videos for Newsstand apps only update with a new app version. This is inconsistent and strange, but there you go.

3) App Video Previews are new, and Apple has already changed the video spec once, so this may become out of date. If so, I’ll attempt to update it as soon as possible.

That said, here’s how to do it.

1) Prepare your Content

App previews are limited to 30 seconds – as in, anything longer is automatically rejected. That’s not enough time to show off anything like a whole issue of a magazine, really, so you’ll probably want to pick and choose your content. We’re using Mag+, so I quickly used the Production Tool to create  a short preview of our current issue:


.. and sent that over to my iPad via WiFi. You could alternatively just pick a few pages and click “Review Selected”.

2) Rehearse

This sounds dumb, but there’s not much point making recording after recording as you learn how quickly you can swipe through pages, and where the best content to highlight can be found. You’ll be able to edit later, of course, but the better your source recording, the less work that’ll be. So grab a timer, and swipe your way through the pages a few times until you’re ready.

3) Record

Connect your iOS device and Mac via Lightning cable. Open Quicktimer Player on the Mac. Choose “New Movie Recording” from the File menu, then when the record window appears click the down arrow next to the record button. Choose your iOS device, which should be listed here.


Once you see your device on screen, as shown above, click Record and swipe through your app. When done, click the Stop button. How you do this part is up to you – for most of our videos I want to set the results to music, so we use a robot (seriously – it’s made of Lego, you can hire it) to swipe through at an exact pace.

Once you’re done, click Save from the File menu – I just dropped the resulting Quicktime file on my desktop, because I’m lazy.

4) Edit

The next step is to edit. If you’re using Final Cut X, open up a new project and drag your video onto the timeline – you’ll be asked to set the project properties:


For an iPad this should be 900 by 1200 at 30p – see Apple’s document here for iPhone resolutions. If you’re using Premiere Pro, use these values as your sequence settings.

Whatever software you use, though, a warning: remember to detach and remove the audio included in your iOS screen recording, as this will be the sound of you tapping and swiping, plus background noise and breathing – it sounds more like a nuisance call than anything you’d want to release into the app store.

5) Export

Once you’ve removed the audio, cut to 30 seconds and made any other edits you want (cuts, titles, music – whatever you want, really) you’re ready to export. In Final Cut X, go to File, Share, Master File, and just use the default Quicktime settings to render out a finished file. In Premiere Pro use Export Media as usual, then set the output to H.264 in MP4 with AAC audio at the desired resolution:

Screen Shot 2014-10-30 at 12.19.55

Once your video is exported, open iTunes Connect in Safari (you have to use Safari on Yosemite, sigh) and create a new version for your app – you can add a video to your current version if you like, but we found that it didn’t appear until our next binary was reviewed and approved. You’ll see an option to add the preview alongside your screenshot images:


So, choose your video file, and pray to the deity of browser-based uploaders that it makes it safely to Apple’s servers in one try. When we first tried this a few weeks back Apple seemed to be enforcing a very strict filesize limit, which necessitated recoding the video over and over at progressively lower quality until it was accepted (by which time it looked, frankly, pretty rough), but this has now been raised to 500MB.

Once uploaded, you’ll see an option to “Edit Poster Frame” option – use this to set the poster image that’ll appear before the video is played:


.. and then save your app version. When you send this new app version off for review, and it’s approved, the preview video should appear alongside your listing. Congratulations, you’re done.

And finally, a word from my sponsors: I look after this stuff for Apptitude Media, where we turn print materials and publications into interactive apps for customers ranging from publishers to banks to film festivals and catalogues. If you have a publication that you’d like to see on the App Store, we can help – just say hello here.


* Yosemite is great – it even works better than Mavericks with our Mavericks server.

Futzing with Swift and Cocoa

June 6th, 2014

I’ve never learned Objective C – my iOS stuff is written in Titanium (essentially Javascript, because anyone can play guita.. uh, write Javascript), and my personal tools for Mac are all scripts to run from Terminal. So the idea of a simpler language that could be used for both iOS and Mac OSX is pretty attractive to me.

Problem is, I’ve never used Xcode, or the Cocoa libraries before. But I thought I’d give it a shot. Based on a few hours of futzing around, here’s what I’ve found – my planned starting point was some button handlers, text inputs, and then some XML file manipulation.

Button Handlers

You can easily drag-and-drop a button onto the window in the Interface Builder view. To handle it, you can add a handler to AppDelegate.swift. First I imported Cocoa and Foundation:

import Cocoa

Then, inside the class AppDelegate:

@IBOutlet var window: NSWindow
@IBOutlet var testButton: NSButton

Then, after the applicationWillTerminate function, add a new function to be called on button click:

@IBAction func buttonclick1(AnyObject) {
  // do stuff
  println("button clicked")

You can then link the button to this function from the Interface Builder (it’s a control-key-and-drag job).

Text Fields and Alerts

After dragging two text fields onto the window in Interface Builder, I added IBOutlet variables for them:

@IBOutlet var text1 : NSTextField
@IBOutlet var text2 : NSTextField

It’s possible to get these – and link them up – automatically by control-dragging the text fields from the Interface Builder into the right area of your code. That done, you can then a value from one field, and put it in the other one:

var fromtextbox = text1.stringValue
text2.stringValue = fromtextbox;

It’s easy to display it in a simple alert box:

let myPopup:NSAlert = NSAlert()
myPopup.messageText = "Modal NSAlert Popup";
myPopup.informativeText = "Echo that variable: \(fromtextbox)"

Because who doesn’t love extraneous alerts. Or, if you need an OK / Cancel:

let myPopup:NSAlert = NSAlert()
myPopup.messageText = "Are you sure?";
myPopup.informativeText = "Do you really want to do that?"
if myPopup.runModal() == NSAlertFirstButtonReturn {
// yes, they're sure.

Else, handle the cancel action, etc.

A File Selector

I want to choose an XML file, in order to later manipulate it. I found that I could get a file dialog box like this:

let myFiledialog:NSOpenPanel = NSOpenPanel()
myFiledialog.allowsMultipleSelection = false
myFiledialog.canChooseDirectories = false
var chosenfile = myFiledialog.URL // holds path to selected file, if there is one

And to check that a file has been chosen:

if chosenfile {
// do something with it

Maniuplating XML

Next up is opening, reading and manipulating that XML file. Getting a local file to manipulate it is pretty easy:

let xmlurl = "/var/tmp/file.xml" // or from your file chooser
let nxmlurl:NSURL = NSURL(fileURLWithPath: xmlurl)
var xmlasstring:NSString = NSString(contentsOfURL: nxmlurl);

Once you have the XML as a string, you could feed it into a proper XML parser – but I just wanted to grab a few values, so used some string manipulation using NSRange objects. You can also bust a string that’s delineated (in my case a com.something.something GUID) into an array of values really easily:

var substrofguid:NSArray = currentguid.componentsSeparatedByString(".")

.. and then when you’re ready to write the string data back to an XML file:

var myfileman:NSFileManager = NSFileManager();
var xmldatatowrite:NSData = myeditedstring.dataUsingEncoding(NSUTF8StringEncoding)
var writethefile = myfileman.createFileAtPath("/var/tmp/file.xml", contents: xmldatatowrite, attributes: nil)

You can then check that writethefile variable to see if the operation completed properly.

QNAP Nas to Nas RSYNC – Stuck at 0%

May 29th, 2014

Something I learned, and which may be useful to someone else:

One of Apptitude’s servers is a QNAP NAS running firmware 4.0.7. Every 24 hours it runs a backup, via RSYNC (SSH encrypted) to a remote site where we have another QNAP.

Last night, the backup job glitched – no errors were logged, but it just sat uselessly at 0% for six hours. Here’s what I learned:

  • The QNAP Rsync system can only handle file paths up to 260 characters
  • It doesn’t fail gracefully if you exceed this

To find the offending files, here’s what I did (on a Mac, in my case, via Terminal):

  • cd to the Volume root
  • find . > filelist.txt
  • perl -nle ‘print if length$_>260’ filelist.txt

Or, thinking about it, you could probably do it in one command:

  • find . | perl -nle ‘print if length$_>260’

Once done, remove or rename the offending files. In my case the names were too long for the Mac to handle, even via Terminal – if that happens, SSH into the NAS and delete them there.


Kittens vs UKIP

May 24th, 2014


Per the excellent suggestion of Marina Isaac, UKitten is a Chrome Extension that replaces all images of Nigel Farage or related to UKIP with images of kittens from Tea and Kittens.

It’s available now from the Chrome Web Store.

UPDATE: Now also available for Safari – click here to download, then double-click that file to install.

In App Purchases

February 2nd, 2014

Lots of people are angry about the way that In App Purchases (IAPs) are being used in iOS games. They make three key points:

1) Many iOS games are shitty and designed primarily to require the player to buy many IAPs

2) Apple promotes many of these shitty games on its App Store storefront

3) The above damage the potential of iOS as a platform for games.

I agree with all three. But some people have gone further, suggesting that IAPs should be removed entirely.

At this point I should declare an interest. I personally make apps that use IAPs – like this one. The company I work for makes digital magazines, many of which use IAPs – like this one. If IAPs were to disappear tomorrow, my own personal bank account would be affected. I’m not unbiased here. But while attempting to keep as objective a head as is possible, I’d suggest that IAPs are very useful things. They allow a couple of key behaviours on the App Store:

1) Apps that allow people to try out the content* or function before committing to pay, and

2) Apps that serve multiple units of content over time

The alternatives in case 1 are two apps (two sets of updates, two items clogging up the store, bleh) or Google’s “try for a limited time” idea, which is comprehensively crappy, as the amount of time reasonably required varies immensely. The alternative in case 2 is to release app after app after app after app, all for the same product – no fun for the maker or user.

And I’d like to suggest a third option. When you add an IAP to the Store, you’re offered several types:

  • Consumable
  • Non-Consumable
  • Subscription (various types here)

It’s the first type – Consumable – that gets abused by lousy games. It’s the one where you pay 99c for ten coins, three gems, an extra magical bunny**, or whatever. It’s of no use whatsoever in either of the cases above, as it cannot be retrieved later (‘restored’) should the user reinstall the app – it’s a one off charge. Banning these from the Game category would immediately curtail a huge amount of lousy behaviour.

Non-Consumables and Subscriptions, I’d argue, mostly work  fine – they enable a way to unlock function or content (case 1, above) and a way to sell multiple items into a single app (case 2). Non-Consumables are particularly suited for adding extra levels etc to an existing game. A subscription could possibly be abused by a game (subscribe on a weekly basis to get some kind of extra power X that multiplies your ability to collect coins / gems / magical bunnies), so perhaps there’s a case for removing these from the Games category too, but I’m not sure people are as ready with their tap-to-buy finger when it comes to an ongoing payment.

Or another alternative to banning or removing anything: why not amend the App Store Guidelines, and enforce that amendment? Apple doesn’t shy away from prohibiting other types of content and behaviour in apps that it sells – would it be unreasonable to use the same method to prohibit crappy consumable-type behaviour in games?

I’d suggest that either presents a more reasonable option than banning all IAPs once and for all. In the meantime, might I recommend the brilliant cartridge-shaped lump of mobile-gaming-wonderful that is A Link Between Worlds? It’s a one-off purchase, no IAPs required.

* Apologies for using the c-word here, but I’m trying to be as general as possible

** Is there a game that involves magical bunnies? I’d play that game.