Apple’s official Swift blog has occasional tidbits, often about new features as the language develops.
I like it, and I’ll pay for it.
I could actually stop there, because that’s really all that matters to anyone – do you like it, and if so, would you be prepared to pay for it? Simple.
But I thought I’d put down a few thoughts on why I like it.
Because it integrates deeply into my existing music ecosystem. Ever since I bought my first iPod in 2004, I’ve had iTunes installed. Through one PC, two Macs, three iPods and four iPhones, it has always been there. Of necessity, of course, but I’m down with it. It is the source of most of my music library (ripped from CDs) and these days that reflects over the cloud directly to my iPhone where I do a lot of my listening. Apple Music integrates well in this space. Not seamlessly, but well.
Because it functions quite well. I’ve had over a dozen listening sessions with the service now, mostly on my iPhone but a few on my Mac. After a very short learning curve it’s making sense most of the time. When it doesn’t, it’s not a huge deal. Well, except the Connect part, but that’s not important to me.
Because it gets me. Really, it does. Lots of people are saying this. It’s the single biggest point in its favour for me. I skip very few songs that it plays for me in its suggested playlists. That’s more than I can say for my dalliance with Spotify earlier in the year. Through Apple Music, I’ve already discovered one new artist who it seems I like a lot, but who I’ve never really investigated before. Apple Music knows this and keeps playing them for me. Plus I’ve come across a few older tracks I love but didn’t have in my library. I do now, though. (There will be a podcast about that, soon.)
Because I can see its breadth. I know the Beatles aren’t on the service. Yet, at least. No biggie. I have all the Beatles music I’m ever likely to want, and last I checked they weren’t releasing new material. But anyone I’ve thought of I’ve been able to find. And that goes for many other people too. A colleague at work is into dark, heavy metal. I suggested he check out the service. “I doubt it’ll have much I listen to” he said. “Try me” I said. He gave up after five bands, all of which I was able to show multiple albums from. He was impressed because “streaming services don’t have that kind of music.” Apple Music does.
Because why not? The only question that enters my mind and gives me pause is “will I use it enough?” It rolled out on June 30th. It’s July 13th. As I said above, I’ve had over a dozen listening sessions already. That’s probably more music I’ve listened to in two weeks than the entire preceding 6 months. It doesn’t hurt that we finally got wifi at work and that none of my team work in the same building as me.
So yeah, I like it and I’ll pay for it.
Banner image © Apple, Inc. From Apple Music..
Further to my post on installing fonts on iOS devices, I came across a slight problem when attempting to include the ever popular Century Gothic font in my font payload. When I located the font it was in a Font Suitcase file which the Apple Configurator didn’t want to know about. I spent some time trying to work out a way around this and eventually hit on a simple method using only an OS X command and a simple piece of free software.
I first discovered that Font Suitcases generally contain regular TrueType fonts (.ttf files) and it is ‘just a matter of extracting those.’ Except every method I came across didn’t work for me. If you search this out for yourself, you’ll likely come across a utility called Fondu which would seem to be the perfect answer – but I could not get it to compile on my Mavericks system. Perhaps if I had more developer-fu I might have succeeded, but I stumbled across a simple, two-step process which works.
Unpacking a Font Suitcase
First up we need to launch a Terminal window to do the first part of the extraction.
At the command line type cd followed by a space.
Finding your Fonts in Finder
As per the process for installing your fonts to iOS, locate the font you require. The Kind will be Font Suitcase and the filename will have no extension. Make sure the Finder window is showing only the directory containing your fonts (i.e. don’t just expand disclosure triangles if you navigate here manually). The icon at the top of the window is a proxy icon for the folder and we’re going to use that to our advantage.
Drag the proxy
Drag the proxy icon from the Finder window to the Terminal window. In my experience with a trackpad, this drag did not always work first time for me. It seems a deliberate pause is needed after clicking (or tapping) to start the drag. It will at least be obvious when the drag has begun. It doesn’t matter where in the Terminal window you drop it.
Having dropped the proxy icon, the full path to the folder has been entered on the command line for us. Press Enter to execute the change directory command.
You will notice the prompt change to reflect we are now in the Fonts folder.
Building the next command
Now we need to enter a reasonably complex command and we’re going to let Terminal help us.
Type cat “ and the beginning of the font name. We need just enough of the name to be unique. In my case, there is also Century Schoolbook so I have to get as far as the G of Gothic to be unique.
Then press the Tab key.
If what you’ve typed is unique, Terminal will complete the name for you and add a closing ” followed by a space as well. Using this feature not only may save some time but we know for fact the filename is exactly right.
Edit the command
This bit you just have to do manually but the important part as far as accuracy goes is taken care of.
Use the Delete key (below the Eject key) or Backspace key (whatever key deletes characters to the left!) to remove the extra space and then the ” character. Then type in
/..namedfork/rsrc" > ~/"
and follow that with the path and filename we are extracting to. This file will be created new or replaced. In my case, I’ve targeted my Downloads folder in my user directory. The actual filename can be anything you want. Make it shorter if you want to save some typing, just remember what it came from. Finally, add a “ on the end and press Enter.
The whole command should look something like this
cat "Century Gothic/..namedfork/rsrc" > ~/"Downloads/Century Gothic.dfont"
First bit done
If all is well you’ll see no errors. We’re finished with the Terminal now unless you wish to extract more fonts, in which case head back to the “Building the next command” step and repeat.
If you open a Finder window and go to your Downloads folder you’ll see the file you created is a Datafork TrueType font.
DfontSplitter « Peter Upfold
Now you need a utility to do the second step. Head on over to Peter Upfold’s site athttp://peter.upfold.org.uk/projects/dfontsplitter and download the Mac version of DfontSplitter. Note – it does work on Mavericks.
Unpack and run
Once downloaded, unpack the Zip file and you’ll get a folder containing DfontSplitter.app and a license file. Right click the app and select Open. You may get a pop-up asking you whether you really want to open an unsigned application. You do!
Return to your Finder window where your dfont file was and drag it to the DfontSplitter window.
Set an output directory
Click the Choose button and select the directory where you want the resulting TrueType (.ttf) files placed. Here I’ve once again specified my Downloads directory.
Once that’s done, click Convert.
DfontSplitter will switch you to the Finder (though not necessarily the right window!) and you should be able to see your TrueType fonts (I’ve selected mine below to highlight them). You can now add these to your font payload in your iOS profile.
Banner image © A. Jenks.
While I was mucking around last night trying, again, to figure out the much talked about “per app VPN” that iOS 7 supposedly offers, I stumbled across a rather glorious discovery. You can install any TrueType or OpenType font on your iOS devices and use those fonts in iWork across iOS and OS X. Hallelujah!
Disclaimer: I stumbled across this process and have managed to replicate it in order to make the documentation which follows. But your mileage may vary, so there are no guarantees this will work for you and I shan’t be held responsible if you do something nasty to your device.
Full details are below. Have at it!
Update: I discovered some fonts on my system were in a Font Suitcase format which the Apple Configurator refuses to deal with. I’ve added a post on how to deal with these.
Update 2: Developer Florian Schimanke has built an iOS app, AnyFont, which makes this process even easier as you can do it directly from your device via iTunes file uploads.
Installing fonts on your iOS devices
In the beginning
Apple has released new versions of iWork for iOS and OS X which now promise “full file compatibility” between these operating systems. However one long standing issue is that of fonts. Whilst the collection of fonts available on iOS has expanded considerably, it doesn’t address the problem for those of us who seek out very particular fonts on OS X. I’m a big user of display fonts for craft purposes and this has always meant the iOS version of iWork was off limits.
Until last night I stumbled across the simple way to solve this. No hacks required! Below you can see part of the available list of fonts on my iPhone before I followed this process. I’m going to add to it. Follow me…
Apple supplied the Font Book application with OS X and we’re going to use this to locate the fonts we want to install. I’ve chosen for this exercise to install a font called Dunkirk. Notice how it has multiple styles of the font. Initially we’re just going to add the Regular style to the iPhone. I’ll come back at the end and cover how to get the others.
Locating the font file
Right click on the font style name as shown and choose Show in Finder to have Font Book reveal the file that defines the particular font style.
The Finder window opens and the chosen font file is highlighted. Note its location – usually in your user folder inside the Library/Fonts folder if it’s one you installed yourself. Don’t do anything with the file here, but perhaps leave the window open as a reference for later.
Obtaining the magic sauce
The trick to installing fonts is to obtain Apple’s Apple Configurator app which is available for free in the Mac App Store. If you search for “apple” you’ll probably see it pop up as the second choice in the list as below.
My screen shows it’s already installed, but you know how to “buy” this free app, right? Well go ahead!
Launching the Apple Configurator
When you launch the Configurator it’ll look something like below. This tutorial was recorded using version 1.4.2. There’s actually a lot you can do with this application – it’s intent is to manage (potentially multiple) iOS devices and you’d probably find it in schools or businesses. But it suits our purposes today as it will let us install fonts on our iOS devices!
Create a profile
The basic concept of the Configurator is creating profiles which contain payloads which are then deployed to the device(s). So we need to create a profile.
Make sure you’re on the Supervise tab and then click on the + button and select Create New Profile…
Our new profile
A panel appears in which we can define our payloads for the new profile. The General tab is the only mandatory one and the only mandatory field is a display name. Here I’ve just called it Font load.
Time for fonts!
Scroll the left side of the panel until you see the Font payload type and then click on it. You’ll get the Configure button. Click that.
Select the font
Remember when we located our font file from Font Book earlier? Now we need to navigate to the same place and select that font file. Then click the Select button.
Our font is a payload now
Once you’ve selected the font, it’ll show up as a small preview in the font tab of our profile pane. It’s now a payload for our profile. As this is all we’re adding to this profile, click on the Save button to save it.
Profile is ready
You’ll now see your new profile in the list of profiles on the Supervise tab.
Next, plug your iOS device into your computer with its USB cable.
With my iPhone plugged in, I can see a number (1) has appeared on the icon for the Preparetab. That’s what you need to see before proceeding.
Let’s get ready to rumble
Click on the Prepare tab and then on the Install Profiles… button. Note the description below it which says “Click to install profiles on a single connected device.” That’s exactly what we want.
Finding the device
As soon as you click the button the panel below will appear. Initially it shows a USB cable but I wasn’t fast enough to capture that! Once it identifies your device it will appear as below.
Click the Next button.
Choose your profile
Next you need to select which profiles to load onto the device. Make sure you tick your profile.
Before you click Next, make sure your device is unlocked!
Then click Next.
If you get this, it probably means you didn’t unlock your device. If that happens, click Close, unlock your device and then click the Install Profiles… button again.
If everything was OK, you’ll see this success screen. You can click the Close button.
Now turn your attention to your device.
Now to ACTUALLY install
You should see a screen like this on your device. Note the display name you provided is the bold title next to the Settings icon and you can see when the profile was transmitted and what it contains – in this case, one font. It’s not verified because we haven’t gone through a signing procedure. If you trust yourself, tap on the Install button.
Accept the risk
Still trust yourself? Tap Install Now.
For your further protection, you now have to enter your phone’s unlock code/password.
Note the heading has now changed to say Profile Installed. Now it’s really installed. Tap on the Done button.
All your profiles are belong to us!
Now you’ll see all the profiles installed on your device, including our new font configuration. Let’s head back to Pages.
In fonts we trust
You may have to quit Pages to force it to reload the font list (double tap the home button and swipe it up off the screen). As you can see below, I now have Dunkirk as a font choice.
The (i) buttons to the right of some fonts give access to different font styles. Remember how Dunkirk had several? We can go back now and add those if we want.
Changing the profile
In my testing, changing a profile’s contents and then reinstalling didn’t work, so the trick is to remove it from the device before reinstalling. You can get back to the list of profiles in the Settings app by going to General and then Profiles (scroll down a way). Removing it is pretty straightforward with a Remove button right there on the detail page.
Updating the profile
To add extra styles or extra fonts, go back to the Supervise tab and double-click on your profile name in the list. That will bring you back to the editing pane.
Adding more fonts
You can click on the small (+) button to add additional fonts. Here I’ve added the bold, italic and bold italic styles of Dunkirk by including the extra three files. Oddly, the font pane does not scroll so be careful picking your font files. You can always use the (–) button to remove them and start again.
When done, click Save to resave the profile and then install as before.
Here’s the install screen for the revised profile with four fonts. Note the Contains field tells us there are now four.
After killing off Pages again and relaunching I can now select bold and italic for my Dunkirk font. I’ve not tested, but I expect other style types will show up when you tap the (i) button next to the font name as I previously illustrated above.
And the final test – here’s the document opened in Pages for OS X. There’s my bold, italic Dunkirk just as I’d hoped!
Banner image composited on Placeit, © A. Jenks.
I know. I can’t help myself with these titles. Sorry.
Some time ago, I heard about Bart Busschots‘s xkpasswd.net password generating site via his appearances on the NosillaCast Podcast. I absolutely love the passwords it generates and I’ve used the site many, many times when setting up new online accounts. My favoured password type is provided by the Web site (16 chars) preset.
Later, Bart mentioned he had developed an Automator-based Service to generate passwords locally on his Mac, directly using the Perl library that sits behind the web site. I’ve never been a huge fan of services. I’ve written one or two in my time but the method of invoking them from menus always seemed a bit fiddly to me and assigning a keyboard shortcut – well, I have trouble remembering most of the ones that OS X provides me in the first place.
So imagine the look of joy that came across my face when I was mucking around with an Alfred 2 workflow the other day and realised it would be the perfect front end to the xkpasswd library!
I’m no AppleScript guru, but I thought that armed with Bart’s documentation on the library and Google for the rest, I’d give it a crack. I made many mistakes, but that’s actually half the fun of doing stuff like this. I’ve been programming on and off in many different languages for over 30 years and I find it challenging and fun. And, when it all works, extremely rewarding.
After I got a basic workflow going, it was time to expand it and smarten things up. I decided that I would allow for generating passwords from all the same presets that are provided on xkpasswd.net. The end result is rather pleasing.
As you can see, as soon as I start typing xk into Alfred, the 6 password types appear. I can either choose one by arrowing down or continuing with the specific keyword which is equivalent to the preset I need.
- xk – Default
- xkweb8 – Web site (8 character)
- xkweb16 – Web site (16 character)
- xkwin – Windows (NTLM compatible)
- xkapple – Apple ID
- xkwpa – WPA2
Alfred sorts by frequency, so my favoured Web site (16 character) is at the top of the list.
If you fancy having this on your Mac, you’ll find the workflow file below, but you’ll also need to install Bart’s xkpasswd library which you can find on his site. I adopted his recommendations for where to store the library, which is in the /usr/local/xkpasswd directory. Visit Bart’s Automator Service blog post for more information (see the second paragraph).
Finally, to explain the title of this post. This workflow, of course, would not have been possible without the work of others – not only Bart’s library, but also various others who think nothing of putting their knowledge out there on the internet for others to benefit from. There was much Googling in the making of this. But I will leave you with Bart’s words when I ran this past him prior to publishing.
The reason I chose the BSD licence for the library was to make it as easy as possible for people to re-use, so this kind of thing makes me smile
Banner image Creative Commons by Bobbi Klein.
Update: at some time since I built this script it has changed (by itself) within Hazel. I guess a Hazel update or an OS X update has prompted this. The difference is in the print line which now reads:
print theFile without «class pdlg»
Thanks to Kelly for alerting me to the fact the original wasn’t working.
If you listen to the Mac Power Users podcast, or perhaps you’ve heard Katie or David on other podcasts, then there’s a really good chance you’ve heard of Hazel. Hazel is a very powerful tool for automation and David and Katie often mention it as part of a solution to their problems.
In the latest issue of ScreenCastsOnline Magazine, Katie wrote about using Hazel to automatically upload files to Evernote. I guess I finally got overwhelmed with all the goodness of the paperless lifestyle and I went and bought Hazel. It’s a very modest USD$25 considering the power it has.
Now, despite the idea being to go paperless – eventually – a current reality is that my wife pays the bills and right now most of them arrive on paper. So one of the bills that arrives electronically usually gets printed in order for it to get paid. Yeah, I’ll work on that!
So I got to thinking – in the meantime, can I use the same techniques to automatically print a document? Turns out yes, I can. It’s pretty easy, too. When you know how! It took me a lot of Googling and experimenting to work out the correct Applescript to print a document. I’ll save you all the trouble. Here’s the code as shown in Hazel’s action panel.
I’ve put the text at the bottom of this post so you can easily copy and paste, too, but above shows the syntax highlighting that Hazel will show you when it compiles successfully.
The only thing you’ll need to change is the name of the printer where you want it to print. Make sure you get the name exactly right. If a window pops up and asks where your printer is, then you’ve got the name wrong. That “smart quote” in the name (for the possessive ‘s’) stumped me for about half an hour because I typed what I saw.
The easiest way to copy the exact printer name is to open the print queue for the printer (you can do this from the Print and Scan System Preference pane), then click on the Settings icon. The name is shown in an editable field from where you can copy it.
When the action runs, you will notice the print queue window open and then close. If it’s already open, it will still close. If you want the print queue window to always remain open, remove the quit line from the script.
Note that I have only tested this on PDF files. It may work for other file types, but you’ll have to find that out for yourself. Applescript allows for instructing specific applications to print their documents, but I will leave that as an exercise for the reader.
tell application "Your Printer Name Here" activate print theFile without print dialog quit end tell
Banner image from Wallpaper Converter by andreea.
In recent weeks there have been a few stories in the Apple press about rumoured plans for Apple to switch from Intel to ARM chips in its Macintosh computers. Most refer to the (I believe) original Bloomberg piece or All Things D’s further analysis of that.
What neither of these stories delved into is that it is very, very simple to ‘predict’ when there will be a mainstream, desktop class personal computer, running an ARM CPU, that will hold its own against a contemporary Intel-powered system. In fact, I’ll do that for you in just a moment. I’ll give you a precise year.
Not only will this computer exist but it will, within two years of launch, run the world’s most advanced operating system – one which won’t be bettered, from a design standpoint, for decades.
OK, so let’s get to the ‘prediction’. Note how I always put inverted commas around ‘prediction’. That’s because technically I am not making a statement about an event yet to come true (or not).
The year was 1987.
Yes, you read that right. In 1986, Intel released the 5 MIPs 80386DX chip, which was to be found inside IBM PCs and clones thereof. Now, that 5 MIPs took a clock speed of 16MHz and consumed a whole watt of power. The ARM2, delivered in 1987, rivalled that performance, peaking at 4.8 MIPs while clocked at only 8 MHz and consuming a few hundred milliwatts of power.
In fact, the ARM architecture was developed by Acorn Computers specifically to power a new, world class range of desktop computers that would become the Acorn Archimedes. Although at launch the Archimedes came with an interim operating system, rather dubiously dubbed ‘Arthur’, it would receive, in 1989, its intended OS called RISC OS.
RISC OS had abilities and followed principles which are slowly creeping into Apple’s OS X. Appropriately modernised, I believe it would be the most user friendly and functional OS available today.
So, could or would Apple bring ARM to the personal computer world? Hell, yes. They’ll bring it back. I’m sure it’s only a matter of time and perhaps surmounting a few obstacles along the way.
As for not being able to run Windows, who cares? Certainly not the majority of Apple’s target market. The geeks will whine. The masses will buy.
Banner image Creative Commons by Binarysequence.