Archive for October 2013

Thursday, October 31, 2013 [Tweets] [Favorites]

OpenWeatherMap

OpenWeatherMap:

The OpenWeatherMap service provides free weather data and forecast API suitable for any cartographic services like web and smartphones applications. Ideology is inspired by OpenStreetMap and Wikipedia that make information free and available for everybody. OpenWeatherMap provides wide range of weather data such as map with current weather, week forecast, precipitation, wind, clouds, data from weather Stations and many others. Weather data is received from global Meteorological broadcast services and more than 40 000 weather stations.

Aperture 3.5

Joseph Linaschke notes what’s new in Aperture 3.5. I don’t find any of it terribly exciting, and I will miss the Google Maps and terrain view, but it does seem like the app has gotten faster.

Exedore 0.1.1

Exedore is a new Python IDE with syntax highlighting, auto-completion, a debugger, and a documentation browser. It’s like a more general version of Schwartz.

Wednesday, October 30, 2013 [Tweets] [Favorites]

iLife, iWork, and the Sandbox

Nik Fletcher:

So that developers can quickly look at the change I’ve put together a repository on GitHub with all the details for Keynote, Numbers, Pages, iPhoto, Aperture, and GarageBand that launched with OS X Mavericks - it seems there’s some interesting stuff in the iOS updates too, but I’ve not yet taken a look for myself.

As you can see, there’s still some Apple private entitlements in use, and GarageBand escapes the sandbox entirely by using an absolute read-write path for not just your hard-drive but any external drives too[…]

He sees it as a positive that Apple is now sandboxing its own apps. On the other hand, it has now been almost two years (and two major OS releases) since the original sandboxing deadline, and in some cases Apple was only able to do it by using entitlements that are not available to third-party developers.

Why Array Indices Start at Zero

Mike Hoye:

This is interesting for a number of reasons, though I’ll leave their enumeration to your discretion. The one that I find most striking, though, is that this is the earliest example I can find of the understanding that a programming language is a user interface, and that there are difficult, subtle tradeoffs to make between resources and usability. Remember, all this was at a time when everything about the future of human-computer interaction was up in the air, from the shape of the keyboard and the glyphs on the switches and keycaps right down to how the ones and zeros were manifested in paper ribbon and bare metal; this note by the late Dennis Ritchie might give you a taste of the situation, where he mentions that five years later one of the primary reasons they went with C’s square-bracket array notation was that it was getting steadily easier to reliably find square brackets on the world’s keyboards.

Update (2013-10-31): Guido van Rossum:

I recall thinking about it a lot; ABC, one of Python’s predecessors, used 1-based indexing, while C, the other big influence, used 0-based. My first few programming languages (Algol, Fortran, Pascal) used 1-based or variable-based. I think that one of the issues that helped me decide was slice notation.

Update (2013-11-22): There’s an interesting discussion on Lambda the Ultimate.

The Decline of Wikipedia

Tom Simonite:

Halfaker’s study, which he conducted with a Minnesota colleague and researchers from the University of California, Berkeley, and the University of Washington, analyzed Wikipedia’s public activity logs. The results paint a numerical picture of a community dominated by bureaucracy. Since 2007, when the new controls began to bite, the likelihood of a new participant’s edit being immediately deleted has steadily climbed. Over the same period, the proportion of those deletions made by automated tools rather than humans grew. Unsurprisingly, the data also indicate that well-intentioned newcomers are far less likely to still be editing Wikipedia two months after their first try.

In their paper on those findings, the researchers suggest updating Wikipedia’s motto, “The encyclopedia that anyone can edit.” Their version reads: “The encyclopedia that anyone who understands the norms, socializes him or herself, dodges the impersonal wall of semi-automated rejection and still wants to voluntarily contribute his or her time and energy can edit.”

Update (2013-10-31): See also the Hacker News discussion.

Fantastical 2

Fantastical 2 (App Store) is another iOS 7 update for a great app. I like the 5-day “week” view when you rotate the phone and the number and punctuation keys on the keyboard, which help with natural language entry. I was a fan of the old theme, but the new, brighter colors are even better. The event list is slightly more compact, so it can actually show more once.

Dan Frakes has a good review:

New in Fantastical 2 is the capability to use this natural-language entry system to create reminders. While you’re entering the task details, tap the calendar/reminder toggle—or simply start your description with “reminder,” “task,” “todo,” or “remind me to” (the four approaches Flexibits specifically recommends)—and Fantastical interprets the text as a reminder instead of a calendar event. As with events, you can specify a particular list using /[list name], and tapping Show Details lets you configure options such as priorities, geofencing, and date/time reminders. (You can also set some of these options by including the information in your task description, such as “remind me Thursday at 4pm.”)

Update (2013-11-06): Brent Simmons:

Fantastical 2 is a new app, but they didn’t want that thing where a new app means you lose all your preferences and have to set up everything all over again.

So what they did is have both versions of Fantastical share a keychain, and they had Fantastical 1 store a copy of some of the preferences in the keychain. Then Fantastical 2 read those preferences back from the keychain — and there you go. No need to set it up again.

Great idea, but it didn’t work on my iPhone.

Tweetbot 3

In general, I like the new Tweetbot 3 (App Store), but it follows two unfortunate trends with iOS apps.

First, it did not remember my preferences or account info from the previous version.

Second, it cannot fit as much on screen at once. Even with the smallest, non-bold font setting, there are fewer characters per line than I’d like. There is also additional vertical padding between tweets. It feels like my screen has shrunk.

Tweetbot 2

Tweetbot 2

Tweetbot 3

Tweetbot 3

Federico Viticci has a nice review:

While the core aspect of the tweet drawer has stayed the same, the fact that it now opens immediately after you tap is a huge improvement in my opinion. I haven’t missed the triple tap actions because the tweet drawer makes it easier to access a wider set of shortcuts; the new animation retains the old app’s idea of “pushing down” tweets below the drawer, but it also reinforces a new kind of physicality that feels less like a robot and more like an object you’re directly manipulating.

Update (2013-11-12): Tweetbot 3.1 adds a smaller font size, which is very nice. You can also turn off the round avatars and badges.

Message List Page Down in Mavericks Apple Mail

Last week I complained that in Mavericks you can no longer Page Up or Page Down through Apple Mail’s message list via the keyboard. The Page Down key used to always apply to the message content pane, even if the message list had focus. However, you used to be able to type Control–Page Down to make it apply to the message list. This no longer works in OS X 10.9.

However, I was able to write a pair AppleScripts that use the accessibility controls to page through the message list. You can use a utility such as FastScripts to assign them keyboard shortcuts.

To page down:

tell application "System Events"
    tell process "Mail"
        set _messageList to scroll area 1 of splitter group 1 of splitter group 1 of window 1
        click button 3 of scroll bar 1 of _messageList -- increment page
    end tell
end tell

To page up:

tell application "System Events"
    tell process "Mail"
        set _messageList to scroll area 1 of splitter group 1 of splitter group 1 of window 1
        click button 4 of scroll bar 1 of _messageList -- decrement page
    end tell
end tell

Tuesday, October 29, 2013 [Tweets] [Favorites]

How Java’s Floating-Point Hurts Everyone Everywhere

John Carmack found an interesting 1998 paper by William Kahan and Joseph D. Darcy (PDF):

Java’s floating-point arithmetic is blighted by five gratuitous mistakes:

  1. Linguistically legislated exact reproducibility is at best mere wishful thinking.
  2. Of two traditional policies for mixed precision evaluation, Java chose the worse.
  3. Infinities and NaNs unleashed without the protection of floating-point traps and flags mandated by IEEE Standards 754/854 belie Java’s claim to robustness.
  4. Every programmer’s prospects for success are diminished by Java’s refusal to grant access to capabilities built into over 95% of today's floating-point hardware.
  5. Java has rejected even mildly disciplined infix operator overloading, without which extensions to arithmetic with everyday mathematical types like complex numbers, intervals, matrices, geometrical objects and arbitrarily high precision become extremely inconvenient.

Darcy went on to work for Sun to improve the situation.

Weather Line 1.0

I’ve been using Weather Line (App Store) for about 10 days now, and it’s my new favorite weather app. It does such a good job of providing useful information at a high density. The chart shows nearly all the important information, and in enough detail that I don’t need to look elsewhere. (I’d like to see precipitation percentages over time and also information about snow accumulation.) You can also tap on an individual upcoming day to get a short textual forecast such as “Light rain in evening.”

The main flaw is that this version doesn’t take advantage of iOS 7’s Background Fetch feature, so sometimes it takes a few seconds to update when I launch the app.

Federico Viticci:

What I like about Weather Line’s UI is that the line has been elegantly augmented with icons, color, and text to carry more information: degrees are shown above the line, and crisp icons indicate weather conditions for each hour, day, or monthly average. For nightly hours, the line is dark, but it turns yellow at predicted sunrise time; if there’s rain on the forecast, the line turns blue.

Update (2013-11-01): Developer Ryan Jones e-mailed to say that the lack of background updates is a deliberate design decision:

We tested and considered it deeply. However, weather data actually changes too rapidly. If we updated in the background, we would still have to update again when you launched the app. So then we’d just be wasting your battery with a background update that we never used. The best experience comes by refreshing data as fast as possible when you launch the app. And we did, it’s very fast.

I’m not convinced. Apple’s own Weather app supports this, and users could always turn it off if desired. For me, battery life has not been a concern. My phone is often docked and on Wi-Fi. However, it is relatively common for me to be out and about with a slow or non-existent cell connection. In these cases, slightly old weather data (e.g. from when I left home) would be preferable to waiting 10–15 seconds to refresh or having to make do with days-old data if it can’t connect. If it makes sense to fetch tweets in the background, I just don’t see a good reason not to do this for relatively less intensive but more important weather data.

Jones also pointed me to the Breckenridge, CO forecast, since we haven’t had much snow here in NH yet. It looks like Weather Line handles snow forecasts pretty well.

Key-Value Observing for the Mainstream

I was going to write about the rare NSHipster article that I wouldn’t recommend, but Damien DeVille already has:

The truth is, in practice it is very important to always use the context to differentiate between observed objects and not rely on the key path. We are working with an object-oriented language and we should always accommodate for the case where a class might be subclassed or a super class expecting a behavior that your own class will prevent.

[…]

Or even worse, would you ever consider handling a signal for a memory error due to calling free on a freed piece of memory because you couldn’t remember whether you previously retained this object and decided to release it anyway.

No. Because this is madness.

Update (2013-10-30): Damien DeVille has more on +keyPathsForValuesAffectingValueForKey::

I hope this helped you understand how the key dependency KVO mechanism works. As I said in the previous post, KVO has very simple rules and is very powerful, as long as you follow the rules.

HyperCard Stacks Decoded

Andreas Pehnack:

Now you can download a free grammar for Synalyze It! that decodes most of the HyperCard stack files. The file format can be easily displayed in a tree view.

Synalyze It is a cool app that I’d like to play with more.

CNET Adds Adware to Mac Downloads

SecureMac:

Direct download links for a variety of popular Mac software products have been replaced on CNET's Download.com with installers for browser toolbars, commonly used by adware to track user browsing habits. A wide variety of Mac apps have had their download links replaced with the adware installer, including popular Mac antivirus software. At this time it is not clear if CNET had provided any prior notification to the creators of affected apps, but it appears that many of the companies were unaware that their download links had been switched to one that installed toolbars and changed web browser settings.

I miss the old VersionTracker. Fortunately, MacUpdate is still good.

Update (2013-11-06): Derek Currie:

VersionTracker used to be heaven for Mac users! It was one of the top 5 best Mac websites on the Internet! I have net friends who work there! I used to haunt the place every day! ...Then CNET bought them.

Mac Pro Posters and Odd Copy

Jeff Carlson:

Opening the tube revealed a set of large Mac Pro posters and a sheet that reads:

It’s the computer we were insane to build. The one that turns conventional thinking on its head, then kicks the living $#&% out of it. We challenged all our assumptions. Abandoned our preconceptions. And blew away limitation after limitation. This is the new Mac Pro. It’s like no Mac we’ve created before. And we can’t wait to see what you create with it.

Neven Mrgan:

This juvenile, defensive, unfunny copy on the Mac Pro posters is positively upsetting. Between this and the Sotheby’s glitz-crap, it’s like all the middle-age insecurities of Apple management are leaking through in their products.

When I first saw this copy, I thought it was a parody. The product seems to actually be good, but it sounds like the writer didn’t believe this was self-evident. Rather than showing, it tells. You don’t need any expansion slots; move along. And, as with “Redmond, start your photocopiers,” I think it’s in poor taste.

Kindle MatchBook

Chris Welch:

Amazon’s Kindle MatchBook service has gone live today, allowing customers to buy a heavily discounted Kindle copy of physical books they’ve purchased from the online retailer. Prices range between free and $2.99, offering a quick and cheap way to expand your Amazon ebook library. And on that note, there’s good news: Amazon says that 70,000 books are enrolled in MatchBook at launch, dwarfing the original 10,000 titles it announced last month.

It’s a great idea, but I’ve been purchasing books from Amazon since the 90s, and it was only able to match 14 of them. Many of the unmatched books are available from Amazon—for full price.

Videos Pulled From iTunes and Amazon Stores

Juli Clover:

According to the customer who noticed the missing titles, Disney elected to remove the content from the iTunes Store, preventing customers who have purchased the movies/TV shows from re-downloading the content via iTunes in the Cloud, which allows users access to previously purchased content.

[…]

On Amazon.com, searching for the titles results in a notice that licensing agreements have prevented the content from being purchased or rented, and as AppAdvice points out, Apple’s iTunes Store Terms and Conditions does specify that previously purchased content can be made inaccessible.

Mavericks and AppleScript’s “exists process”

Dave Nanian notes that running an AppleScript that asks System Events merely whether a process is running brings up the new accessibility permissions dialog. This has caused some problems for SuperDuper. Unfortunately:

LinkedIn’s IMAP Proxy for MobileMail

Martin Kleppmann:

Intro’s approach of proxying IMAP is a novel way of delivering software to users. It operates at the limit of what is technically possible, but it has a big advantage: we can enhance the apps you already use.

The iOS Mail app doesn’t support plug-ins, so LinkedIn built a server that intercepts messages between your mail server and your iPhone so that it can inject content and controls directly into the message body.

Mavericks and Multiple Displays

Mavericks is famously supposed to improve the multi-display experience:

OS X Mavericks takes full advantage of every display connected to your Mac, giving you even more flexibility to work the way you want. There’s no longer a primary or secondary display — now each has its own menu bar, and the Dock is available on whichever screen you’re working on. You can run a full-screen app on one display and have multiple windows on another display, or run a full‑screen app independently on each display. You can even turn your HDTV into a fully functional second display using AirPlay and Apple TV.

My experience has been that, when not using full-screen, the new design is a regression. It seems to be designed around the idea of using this application on this display and that application on that display. Using one application on multiple displays doesn’t work as well as in previous versions of Mac OS X (or, indeed, classic Mac OS). Apple tried to make a “power user” feature easier to use but ended up making it less powerful and less useful.

Applications no longer remember which display a window was on. Instead, they always seem to open on the display that currently has the menu bar. If I have a document open on my auxiliary display, save it, close it, and double-click its file in the Finder, the window re-opens on the other display.

Likewise, there are some auxiliary windows (Mail and EagleFiler’s Activity windows, various downloads windows) that I like to have off to the side, while working with the main application windows on my main display. Instead, every time I open Mail it puts the Activity window on the main display, right on top of my inbox.

Another problem is that once I move the auxiliary window to the side, where I want it, it becomes a magnet that attracts future primary windows to the wrong display. For example, if an Activity window is on the small display and all the other windows have been closed, the application’s menu bar will be on the small display, which means that documents will open there (and have their windows shrunk) even though I have always specifically placed them on the large display.

These issues also apply when there are no auxiliary windows, for example if you use the same application to work on two different projects. It is natural to want the windows for project A on one display and the windows for project B on the other display. Mavericks wants you to either put all the windows on one display or to group the windows by application rather than by project.

Update (2013-10-30): Pierre Igot reports that you can get the old multi-display behavior back by unchecking Displays have separate spaces in the Mission Control preference pane. I actually saw that option but didn’t think it would have that effect, however it sort of makes sense when you think about it. Unfortunately, this also brings back the Mountain Lion behavior of only being able to use one display when using an app in full screen.

Apple Discussions

Lawrence Lessig:

What’s striking about the comments on the Apple community site is the frustration — frustration because of Apple’s apparent policy not to respond to comments. Unlike really helpful companies which try to reward people who spend time making community boards the best source for technical support by engaging with posts, and at least acknowledging the problems, Apple’s policy seems to be a “never comment” policy. Which leads its users — and again, people who are volunteering their time to help lower Apple’s customer support cost — to express increasing exasperation at the unanswered problems.

The Apple support forums are an excellent resource. On the one hand, it seems unimaginable that Apple would encourage its support representatives to participate there on the record. It likes to carefully manage its public image. On the other hand, what a difference it could make if done well. If I’m considering buying an app and see that the user forum is full of unanswered questions, that’s a red flag. In the Apple forums, there are threads with hundreds or even thousands of replies, none from Apple. True or not, this leaves the impression that Apple doesn’t know about the problem and doesn’t care.

Lessig also mentions that Apple moderates the forums and deletes certain types of comments that are potentially useful to customers. This is a separate issue that I don’t think is clear-cut.

Mavericks Font Smoothing

Since updating to Mavericks, I’ve noticed that text is not rendered as crisply. Here are some screenshots showing Verdana in Safari 7:

Mountain Lion

Daring Fireball on Mountain Lion
FogBugz on Mountain Lion

Mavericks

Daring Fireball on Mavericks
FogBugz on Mavericks

It feels harder to read, and compared side-by-side the Mavericks text looks like a fuzzy mush to me.

Related:

Update (2015-03-11): Mike Ash had the same problem with Xcode and multiple displays:

Fixed Xcode’s antialiasing dumbness. Patch -[NSTextView drawRect:], do [[self layoutManager] setUsesScreenFonts: YES];.

I made a hacked Xcode plugin. There’s an undocumented API for that. I might see about cleaning it up and publishing something.

Monday, October 28, 2013 [Tweets] [Favorites]

Manage iCloud Download Settings for This App

In September, I noted how Apple now lets users download previous versions of iOS apps, since the current version may not be compatible with iOS 7. Unfortunately, this feature was not available for the Mac App Store.

On October 22, I received an e-mail from Apple indicating that this was now possible for Mac apps:

Users who have already purchased your Mac app are now able to download previous versions, allowing them to use your app with Macs that may no longer be supported by OS X Mavericks.

If you do not want previous versions of your app to be available for download as a previous purchase, for example due to a usability or legal issue, you can manage their availability in the Rights and Pricing section of the Manage Your Apps module on iTunes Connect. To exclude a specific version, click “Manage iCloud download settings for this app.” For more information on managing previous versions, see the iTunes Connect Developer Guide or contact us.

I was not able to find those settings in iTunes Connect (though I’ve seen screenshots of where they are for iOS), so I contacted Apple and received this reply:

Thanks for taking the time to write to me regarding the difficulties you are facing managing previous versions of your Mac OS App, [redacted].

I want to let you know that it is only possible to manage previous versions of an iOS App. This function is not currently featured within Mac OS Apps.

So apparently the first e-mail was a mistake.

Update (2013-10-28): John Brayton says the settings are available for him.

Update (2013-12-06): It’s worth emphasizing that downloading previous versions only works for users who had already purchased a previous version. If you make your app 10.9-only, it cannot be purchased at all by users running older versions of the OS.

Sunday, October 27, 2013 [Tweets] [Favorites]

Reduce Motion in iOS 7.0.3

Federico Viticci:

iOS 7 was criticized by early adopters for the slowness and amount of animations and transitions throughout the OS. A subset of users asked Apple to reduce the motion of the OS as it was causing motion sickness for them; a setting that the company had included in the Settings app wasn’t enough, as it disabled the parallax effect of iOS, but not the new animations.

Apple has listened, and in iOS 7.0.3 the Reduce Motion setting (available in General > Accessibility) now truly reduces animations: switching to apps and back to Home screen, unlocking the device, and moving between folders is now a cross-fade that is much faster than Apple’s animations with Reduce Motion turned off.

In my iPhone 5s first impressions post, I wrote:

It still feels like I’m often waiting for the phone, though sometimes this is for animations or the network.

I have not timed it, but subjectively the cross-fade feels much faster to me than the animation. It makes my phone so much more pleasant to use that I think Apple should make this the default.

How Apple Makes the Mac Pro

Greg Koenig:

As a product designer, one of my favorite parts about any new Apple product launch is the inevitable “How it’s made” video. The Mac Pro incarnation did not disappoint.

What makes Apple fascinating is not that they are using some wiz-bang alien technologies to make things - even here in Portland, Oregon, all the technologies Apple shows in this video are in-practice across numerous local factories. What makes Apple unique is that they perform their manufacturing with remarkable precision and on a scale that is simply astonishing, using techniques typically reserved for the aerospace or medical device industries.

A fascinating explication of the video from the October 22 event.

Finder 10.9 Disk Space Embellishment

Jonathan Rentzsch:

Looks like Finder 10.9 now deducts the space taken up by Mobile Time Machine backups on the theory that they’re purgeable under disk-space pressure. Apple wrote a backgrounder on the topic.

Numbers ’13 Performance

Despite fewer features and a newer codebase, Numbers has always seemed slower to me than Microsoft Excel. With iWork ’13 backported from iOS to Mac, I expected to see some performance improvements. After all, iOS devices have less RAM and slower processors. In theory, iWork’s new binary file format should also be smaller and faster than XML.

Here are some measurements that I made on a 2012 MacBook Pro using a 10.5 MB CSV file, an export of my FogBugz cases:

Numbers ’09Numbers ’13Excel 2011OpenOffice 4.0.1
Open CSV File2m10s3m25s2s10s
Save Native File6s2s1s3s
Open Native File7s10s2s6s
Open Numbers ’09 File7s16sN/AN/A
Native File Size2.6 MB15.5 MB3.7 MB2.2 MB
Unzipped Size62 MB16.4 MB22.4 MB57.4 MB

For opening my file, Numbers was always way slower than Excel. The new version of Numbers is even slower.

The new Numbers file format is much faster than the old one at saving, but it’s slower at opening. Excel is much faster than either.

Numbers ’13 takes more than twice as long as Numbers ’09 to read files in the old format.

The old Numbers file format was actually more compact than Excel’s. The new format is nearly 6 times the size of the old format.

On the other hand, the uncompressed Numbers ’13 format is more compact than Excel’s format and much smaller than the old format. Presumably, this allows it to use much less RAM.

Update (2013-10-29): I’ve added results from OpenOffice, a C++/Java app that uses a compressed XML document format.

Saturday, October 26, 2013 [Tweets] [Favorites]

Exploring the New iWork File Formats

Nick Heer (via Oliver Taylor):

I think the new file format is a regression, though. I would love to know the justification for these obfuscated data files, and what advantages they bring over the previous XML-based format. I’d love to be able to tell you what advantages they bring, but they’re unreadable. This isn’t yet a problem for end users, aside from the lack of backwards compatibility, but it might be in the future.

No more documented XML format or included PDF version, which was much better for previewing than Quick Look. Note that Apple is not eating its own dog food here. The file format does not use property lists, NSKeyedArchiver, or Core Data.

Update (2013-10-27): Drew McCormack:

They have split that potentially large XML document into many small binary files. Each file can now be loaded in isolation, and this is much better for iOS. Effectively, they have built a partial-loading document format. Closer inspection shows that each slide is a separate file, so they can just load what is on the current slide, and leave the rest on disk.

This makes a lot of sense except that Core Data is already a reasonably compact, partial-loading document format. It has efficient syncing support as a built-in feature, and the underlying SQLite format is robust and open. On paper, Core Data is what an app should use in this case. Yet the iWork team apparently had so little confidence in Core Data (or perhaps the iCloud portion) that they invented a whole new file binary format.

Update (2013-10-29): Drew McCormack:

Apple is apparently using Google’s Protocol Buffers for iWork’s file format.

Update (2013-11-08): Sean Patrick O’Brien has an in-depth look at the new file format:

Components are serialized into .iwa (iWork Archive) files, a custom format consisting of a Protobuf stream wrapped in a Snappy stream.

Friday, October 25, 2013 [Tweets] [Favorites]

AppleScript and Mavericks

Mac OS X Automation covers new AppleScript features in Mavericks:

iCloud Document Support:

In OS X v10.9 or later, when you create or change documents using the AppleScript Editor or Automator applications, iCloud can keep the scripts, workflows, and applets up to date in those editors on your other Macs.

Applet Code Signing:

Code Signing support has been added as an export feature to both the AppleScript Editor and Automator applications, enabling Apple developers to easily generate signed copies of their applets and droplets.

AppleScript Libraries:

AppleScript Libraries provide a new plugin architecture for extending the power and abilities of AppleScript. AppleScript Libraries are user-created script files and bundles, composed in AppleScript or AppleScript/Objective-C, which contain specialized commands that can be referenced in scripts to provide extra or “missing” functionality.

The “use” Statement:

For its 20th anniversary debut in OS X Mavericks, AppleScript delivers a long-sought ability: an import command — dramatically extending the scope and power of this unique language.

A new AppleScript construct, called the “use statement”, imports the terminology and functionality of AppleScript Libraries and scriptable Applications through a simple single-line declaration placed at the top of a script, such as: use application "Finder", or: use script "My AppleScript Text Library".

System Notifications Support:

No longer will scripts and workflows have to display dialogs to inform users that time-consuming or complex automation processes have completed. With integrated notification support for AppleScript and Automator, users can leave their automation processing unattended, confident that they will be notified of the results in the built-in Notification Center.

Accessibility Preferences and GUI Scripting:

In OS X Mavericks, security controls are more granular, requiring the individual addition of applications, or automation applets that script the accessibility frameworks, to an approval list, displayed in the Security & Privacy system preference pane.

Interleaved Syntax:

In OS X 10.9, AppleScript introduces an alternative syntax for calling handlers and methods. Instead of using underscores and running the terms together, like this:

theString's writeToFile_atomically_encoding_error_(thePath, true, current application's NSUTF8StringEncoding, missing value)

You use an interleaved syntax similar to Objective-C, like this:

theString's writeToFile:thePath atomically:true encoding:(current application's NSUTF8StringEncoding) |error|:(missing value)

This is great for AppleScriptObjC. Unfortunately, although you can use the interleaved syntax for your own handlers in regular AppleScripts, you still cannot call into the Cocoa frameworks from regular AppleScripts (like you can via the PyObjC and RubyCocoa bridges).

Don Southard:

Most of all, I am happy to see Apple putting a focus on the power user with these enhanced automation tools and I hope it is a sign of the bright future OS X still has had of it.

Dr. Drang:

But improvements in the AppleScript language itself are like the proverbial tree falling in a forest. If no applications bother to use AppleScript, do those improvements exist? Not in any practical sense. No one in their right mind uses AppleScript as a standalone language; it’s all about adding functionality to an app or acting as glue between apps.

Mavericks, Gmail, Apple Mail, and MailMate

Benny Kjær Nielsen:

Recently, I implemented a workaround in MailMate for the problem of multiple labels. It is currently an experimental solution and you can enable it following the instructions in the release notes for version 1.7. In short, MailMate can be told to handle specific Gmail labels as if they were tags. If a label is handled as a tag then MailMate automatically ignores the corresponding IMAP mailbox. Tags are already supported by MailMate (no integration with Mavericks yet) and uses IMAP keywords on standard IMAP servers. An added benefit of this is that you can move messages between Gmail accounts and other IMAP accounts and the tags are preserved. This is great if you are planning to migrate…

PDF Downloads Broken in Safari on Mavericks

I’ve long used the WebKitOmitPDFSupport default so that Safari would download PDF files rather than display them in the browser window. In Mavericks, there’s a bug where this causes Safari to display the raw data of the PDF file. You can prevent this by entering these commands in Terminal go back to the default behavior:

defaults write com.apple.safari WebKitOmitPDFSupport -bool NO
killall -SIGTERM cfprefsd

I found that the killall was necessary, even if Safari was not running, in order to make the change stick. Logging out might also work.

When Safari is displaying a PDF file, there are two main ways to save it to disk:

I’m not aware of any built-in way to auto-download PDF files without either of these extra steps. If there’s a link to the PDF file, you can Option-click it, but often there is no visible link.

Wednesday, October 23, 2013 [Tweets] [Favorites]

Mavericks Apple Mail and Gmail

Joe Kissell:

However, it seems Apple didn’t entirely think through the implications. Most seriously, with All Mail enabled, Mail periodically gets into a state in which, according to the Activity panel (choose Window > Activity), it’s synchronizing my Gmail Archive (that is, All Mail) and updating the cache directory for my Gmail account. That’s all well and good as long as it happens in the background. But when one of these syncing fits starts, changes to messages in my Inbox made in other clients or on the Gmail Web site aren’t reflected in Mail. Not even if I quit and restart Mail, or rebuild the Inbox, or force a synchronization! There appears to be nothing I can do but wait, and sometimes that wait is hours. Worse yet, sometimes the syncing ends — Mail’s Activity panel shows zero activity — and still my Inbox is out of sync for a long time. (For example, as I write this, Gmail shows I have no unread messages in my Inbox, but Mail shows 10, including some I filed more than two hours ago.)

From what I’ve been hearing, various areas of Mail in Mavericks are extremely buggy and/or slower than in previous releases. Don’t forget that there are alternatives.

Update (2014-02-25): Joe Kissell:

I’ll begin with the usual disclaimers: not every problem has disappeared, and what works for one person doesn’t necessarily work for everyone. Even so, this is the first version of Mail in Mavericks that feels reasonably reliable, and it’s about time!

Amazon Increases Free Shipping Minimum to $35

Amazon (via Jacob Kastrenakes):

Amazon’s minimum order size for free shipping has changed to $35. This is the first time in more than a decade that Amazon has altered the minimum order for free shipping in the US.

I’m still holding out from getting Prime.

iWork ’13: A Huge Regression

Clark Goble:

Effectively AppleScript support is gone. Numbers doesn’t even have a dictionary. And Pages has had nearly everything removed.

I could go on about how almost none of the problems I’ve been griping about for four years in Numbers have been fixed. But what’s the point. Apple has spoken. It wants the OS X iWork to basically be the same as the iOS version and designed purely for casual use. By making it free they kill the market for any competitors other than Office. So if you run a small office, even if you hate MS-Office, there’s really no alternative anymore.

[…]

This isn’t just like Apple not upgrading the Mac Pro. This is like Apple not upgrading the Mac Pro for four years, then announcing that the Mac Mini is the new Mac Pro.

And it looks like the user interfaces are now full of gratuitous popovers. Dr. Drang says:

They’re leveling the playing field to make the OS X versions = the iOS versions = the web apps. Toys.

Apple simply doesn’t respect the workflows that pro customers build. This has been shown again and again with different apps, and it extends to the developer tools. Xcode 5 still hasn’t restored the AppleScriptability that Xcode 3 had, and there’s undocumented voodoo that you need to apply just so that previously working projects will continue to build.

Update (2013-10-24): Benedict Evans:

New version of iWork killed the ability to do a scatter chart with dates. Unimaginable Microsoft would do that.

Pierre Igot on Pages:

But Apple’s engineers appear to have chosen to keep the emphasis on “simplicity” at the expense of “power”. They have not just neglected to add features to bring the feature set of the application closer to that of a word processor like Microsoft Word. They have actually removed many features for no apparent reason other than to bring the application in line with its iOS counterpart, which is, inevitably, much less powerful.

Update (2013-10-25): Here are some Apple support threads about features removed from Keynote, Numbers, and Pages (1, 2). Macworld also has comments about the new Keynote.

Update (2013-10-26): Pierre Igot:

It is quite clear that, for people like me, the present situation probably means several more years of using Pages ’09 with not a single enhancement or bug fix. The best we can hope for from Apple is minor application updates to maintain compatibility with the OS or for security purposes. And even that is not guaranteed. It is very discouraging.

[…]

I know very well that it is not quite normal that I have ended up relying on Pages so much in my work. But that’s the way it is, but that’s the way the desktop publishing industry is. The so-called “industry standard” (Word) is junk, and there is no real competition that leads to better products for end users. Pages ’09 was a bit of a miracle, in that it was a well-designed (albeit far from perfect) piece of OS X software with quite a bit of power “under the hood”, if you were willing to spend a bit of time to scratch the surface — hence the attractiveness of the software for more advanced users like myself.

John Gruber:

The bottom line as I see it: you need to have clear priorities, and Apple’s highest priority here was clearly cross-platform parity for iPhone, iPad, web, and Mac. No other office platform in the world has that — complete parity between native apps for phone, tablet, desktop, and a web app. Other companies have different priorities; Microsoft, for example, has feature-completeness built into its DNA. A version of Microsoft Office for Windows that removed functionality to achieve parity with the mobile version is unimaginable.

Update (2013-10-30): Anxious Machine:

The difference is the motivation. Apple rewrote Final Cut from the ground up because they thought they could provide a better, more intuitive way of editing video. I'd argue that the magnetic timeline actually was a feature that deserved to have the app rewritten around it. By contrast, iWork on the iPad clearly was and still is an inferior experience to the desktop versions. Choosing to rewrite the apps around those inferior versions suggests that Apple misunderstands both the strengths and weaknesses of both its platforms, which is disheartening to say the least.

Update (2013-11-04): Joe Kissell:

And even though I rarely used most of the features that are now gone, I appreciate how upsetting it is to find that Keynote has profoundly broken a presentation that you crafted carefully.

Update (2013-11-06): Apple (via Dan Moren):

In rewriting these applications, some features from iWork ’09 were not available for the initial release. We plan to reintroduce some of these features in the next few releases and will continue to add brand new features on an ongoing basis.

Update (2014-02-21): Dan Moren:

This is the second update to iWork since Apple announced its plans to restore features dropped from the rebuilt versions of its productivity apps. In November, the company released updates that returned the ability to customize iWork’s toolbars on the Mac. But Apple’s self-imposed to-do list still has a few items on it yet, so expect to see further updates as 2014 progresses.

Ben Waldie:

The latest update of Numbers reintroduces AppleScript support in a big way. While Apple could have taken an iterative approach, reintroducing a few commands here and there, it chose instead to go whole-hog: The entire suite of scripting terminology originally supported by Numbers in the 2009 edition of iWork has returned.

[…]

Unfortunately, it does not appear that either of the other iWork apps—Pages or Keynote—have yet received the same infusion of AppleScript support.

Tuesday, October 22, 2013 [Tweets] [Favorites]

The Effects of Compiler Optimizations

A great question on Stack Overflow (via David Smith):

I first noticed in 2009 that gcc (at least on my projects and on my machines) have the tendency to generate noticeably faster code if I optimize for size (-Os) instead of speed (-O2 or -O3) and I have been wondering ever since why.

I have managed to create a (rather silly) code that shows this surprising behavior and is sufficiently small to be posted here.

There’s so much going on in modern processors that it can be tough to predict how code will behave.

Why Does Windows Have Terrible Battery Life?

Jeff Atwood:

The Surface Pro 2 has a 42 Wh battery, which puts it closer to the 11 inch Air in capacity. Still, over 11 hours of battery life browsing the web on WiFi? That means the Air is somehow producing nearly two times the battery efficiency of the best hardware and software combination Microsoft can muster, for what I consider to be the most common usage pattern on a computer today. That's shocking. Scandalous, even.

And this was before Mavericks.

The iPhone’s Positioning Sensors Were Never Good

Josh Centers:

Much is being made of Gizmodo’s tests showing that the positioning sensors in the iPhone 5s are off. Not just a little off, but off in a non-trivial way. The gyroscope read 3 degrees off, the compass 8 to 10 degrees off, and even the accelerometer seemed to be inaccurate.

The accuracy seems to be improved with iOS 7.0.3.

Mavericks

iMessage End-to-End Encryption

John Gruber:

Leaving aside the moral implications of flat-out lying to their customers, I would think that if iMessage’s back-end were designed with a weakness exploitable by Apple as Quarkslab supposes, Apple would say or promise nothing with regard to iMessage’s susceptibility to server-side decryption rather than compound that weakness with blatant lies to the contrary. To lie would be to take an enormous PR risk for a relatively small PR gain. I say “small PR gain” simply because I doubt most people who use iMessage even know their messages are supposed to be securely encrypted from end-to-end. I say “large PR risk” because if Apple’s statements regarding iMessage encryption are eventually discredited, the backlash in the press will be severe (and justly so).

I agree, but I still think that it’s a mistake to focus on the end-to-end encryption and Apple’s statements about same. Most iMessage users are probably using iCloud Backup, which does retain copies of the messages, and does not encrypt them with a device key. There’s no need to intercept messages that are already being stored. Since Apple has not, to my knowledge, claimed otherwise, I think it’s reasonable to assume that when it provides data to law enforcement this includes data from backups.

Mac App Store Receipts and Mavericks

Craig Hockenberry describes more problems developing on Mavericks:

After decrypting and checking the receipt payload, the value was “3.6.2b1” not the version I just installed. Where did this old version number come from? Why did following the advice in the dialog and deleting the app not fix the problem. How come this old receipt kept showing up no matter what I did?

Saturday, October 19, 2013 [Tweets] [Favorites]

Functional Reactive Programming on iOS

Ash Furrow’s forthcoming book looks good:

Ever wanted to learn about functional programming, but didn't know where to start? Grab this book to learn about applied, real-world use of functional reactive programming on iOS using ReactiveCocoa.

Update (2013-10-29): Drew McCormack:

And it is a good introduction. It’s not dauntingly long, so if you have a passing interest, you can easily read it in a few hours without having to commit to a whole new career. I recommend you take a look if FP is something that you have wondered about.

Podcast App Playback Speeds

Marco Arment:

In the early days of iOS podcast playback, when Apple first implemented multiple speed settings, they used inaccurate labels. Apple’s “2x” setting, for instance, was really 1.5x. Their “1.5x” setting was really 1.25x. And their “½x” setting was really 0.8x.

Apple’s Podcasts app now uses the advertised speeds, but Downcast uses the old ones.

The Little Book of Semaphores

The Little Book of Semaphores (via Jonathan Dann):

The Little Book of Semaphores is a free (in both senses of the word) textbook that introduces the principles of synchronization for concurrent programming.

In most computer science curricula, synchronization is a module in an Operating Systems class. OS textbooks present a standard set of problems with a standard set of solutions, but most students don't get a good understanding of the material or the ability to solve similar problems.

The approach of this book is to identify patterns that are useful for a variety of synchronization problems and then show how they can be assembled into solutions. After each problem, the book offers a hint before showing a solution, giving students a better chance of discovering solutions on their own.

Friday, October 18, 2013 [Tweets] [Favorites]

Masters of Doom

Jeff Atwood reviews the 2003 book Masters of Doom, about the history of Id Software:

It’s unusual to find a book about a contentious, complex friendship and business relationship that both parties sign off on – and even a decade later, regularly recommend to people interested in their personal back stories. But it is a testament to just how right Kushner got this story that both Romero and Carmack do. This is exactly the sort of meticulously researched, multiple viewpoint biography that you’d want to read about important people in your industry. In that sense, it’s kind of the opposite of the Jobs biography, which I liked well enough, but it presented one viewpoint, and often in a very incomplete, sloppily researched way. I would kill to read a book this good about Jobs.

Code Signing and Mavericks

Craig Hockenberry:

Very simply put, you can no longer sign a bundle (like your .app) if any nested bundle in that package is unsigned. These nested bundles are things like helper executables, embedded frameworks, plug-ins and XPC services.

The result is that you’ll need to update your Xcode projects as soon as you start building on 10.9. It’s taken me several days to understand what these changes are, and with the help of Perry Kiehtreiber on the developer forums, I’d like to share what I’ve learned.

Apple has been asking developers to update their apps for Mavericks, but the process for doing so is fragile and poorly understood.

Update (2013-12-20): The storeagent problem is still not fixed. It seems to be impossible to build an app for the Mac App Store unless you are using Mac OS X 10.8 and Xcode pre-5.

Update (2013-12-28): My customers are also having problems with 10.9 storeagent installing the version of my app that was built using 10.8.

Fighting a 30-year-old Software Bug

Ovid (via Kyle Sluder):

Remember how Lotus 1-2-3 considered 1900 a leap year and how that was faithfully copied to Excel? Because it adds an extra day to 1900, many date calculation functions relying on this can easily be off by a day. That means that 39082 might be January 1st, 2011 (on Macs), or it might be December 31st, 2006 (on Windows). If my “year parser” extracts 2011 from the formatted value, well, that’s great. But since the Excel parser doesn’t know whether it’s a 1900 or 1904 date system, it defaults to the common 1900 date system, returns 2006 as the year, my software sees that the years are five years apart assumes an error, logs it, and returns the unformatted value.

Modern Receipt Validation

Apple’s sample code for Mac App Store receipt validation still uses OpenSSL, which as of Mac OS X 10.7 we are not supposed to dynamically link against. You can statically link with OpenSSL, but Satoshi Numata has posted some more modern code that uses only the built-in libraries (via Craig Hockenberry).

Thursday, October 17, 2013 [Tweets] [Favorites]

Crowd Funding MailMate

Benny Kjær Nielsen:

As described in a recent blog post I can no longer afford to work on MailMate full time. Instead of silently slowing down development of MailMate I’ve decided to take the opportunity to do a little experiment. I’m going to try to crowd fund my full time development of MailMate in 2014 (the rest of 2013 is already covered by my primary “sponsor”). I know, in a world of free or practically free email clients this is madness, but I did write that this was an experiment.

I plan to contribute. I hope that he’ll be able to keep working on MailMate, which is already a very impressive and innovative mail client.

Wednesday, October 16, 2013 [Tweets] [Favorites]

Terminology 3

Greg Pierce introduces the iOS 7 rewrite of Terminology (App Store):

Terminology starts with a great offline U.S. English dictionary-thesaurus built around exploring word relationships. Its concise definitions are complimented by deep heirarchical information about the language – with not just synonyms and antonyms, but more and less specific terms, member/part relationships and more.

Gabe Weatherhead:

There are fair number of installable queries and more are available everyday through the action library. But why stop there. Have your way with Terminology and mold it into your own general query tool with custom URLs.

I see it like a LaunchBar for iOS.

Should You Use Core Data?

Marcel Weiher:

When we actually measured the performance of applications adopting CoreData at Apple we invariably got a significant performance regression. Then a lot of effort would be expended by all the teams involved in order to fix the regression, optimization effort that hadn’t been expended on the original application, usually making up some of the shortfall.

[…]

CoreData may well be the best implementation of an in-process-ORM simulating a client-server enterprise app there is, and there is good evidence that this is in fact true (certainly the people on it are top notch and some of the code is amazing). However, all that doesn’t help if that’s not what you need.

This is in response to Drew Crawford’s year-old post, which we’ve been discussing on Twitter. The post stated:

Well, I don’t think there is a real reason not to use Core Data for virtually any project of any size.

It hasn’t aged well given the realities of Core Data syncing.

My view is that Core Data is often the wrong choice but that, unless you know that you will only have a small amount of data, it makes sense as a default choice. Core Data is a generalized framework that’s relatively easy to use. I think it’s often good enough, though some smart people disagree.

For a specific problem domain, you can probably make a custom solution that’s much faster, but that effort may be better spent on other parts of the product. You do, however, need to watch out for what Crawford charitably calls “corner cases,” where Core Data’s performance is abysmal compared to SQLite’s (also a generalized tool). There are probably good reasons that Apple doesn’t use Core Data for applications like Mail and Aperture that deal with lots of data. (It’s interesting to take a look at the SQL that Mail uses.)

A trend I see, among both Apple and third-party applications, is using Core Data (or SQLite more generally) as a cache or cache-like layer. The “real” data is persisted in a more open format. The database is there to manage the working set and provide fast queries.

I currently use Core Data in two of my apps (and am adding it to a third) and have few complaints. However, I don’t always use Core Data objects as my model objects. Core Data’s threading model is unsuitable for EagleFiler, so it uses a sort of repository pattern with plain objects atop the database layer, which can be swapped out. And in some areas it doesn’t use Core Data at all. I see Core Data as a persistence tool, like FMDB, rather than as a complete solution.

Looking forward, Tony Arnold discusses where we are:

The problem is, everyone uses Core Data because there’s nothing better. It’s the best way to persist structured data on iOS and OS X, but it’s not actually much fun to implement and has many warts.

and what he thinks should be improved. To his list, I would add that indexed full text searching is sorely needed.

Reverse Engineering a D-Link Backdoor

Craig Heffner:

In other words, if your browser’s user agent string is “xmlset_roodkcableoj28840ybtide” (no quotes), you can access the web interface without any authentication and view/change the device settings […]

[…]

After some grepping, I found several binaries that appear to use xmlsetc to automatically re-configure the device’s settings (example: dynamic DNS). My guess is that the developers realized that some programs/services needed to be able to change the device’s settings automatically; realizing that the web server already had all the code to change these settings, they decided to just send requests to the web server whenever they needed to change something. The only problem was that the web server required a username and password, which the end user could change.

The Final Straw for Newsstand

Marko Karppinen:

For years, I’ve argued that choosing Newsstand is the best thing—the right thing—to do when publishing periodical content within the Apple ecosystem. But with the redesigned app, and with automatic content downloads no longer a being a Newsstand exclusive, the balance has finally shifted.

We think publishers should skip Newsstand and publish their iOS apps as regular non-Newsstand apps instead.

There is one final reason for this recommendation. If you publish your app outside the Newsstand section, you can always switch to Newsstand later. The opposite is not true.

Update (2013-10-16): Glenn Fleishman:

Put bluntly, Newsstand is a ghetto. Readers complain to me regularly about forgetting to read The Magazine, even though we use iOS notifications for each issue. If readers don’t read immediately and don’t remember to tap the Newsstand icon later, they forget about us entirely.

Update (2013-10-18): Glenn Fleishman:

I realized that I could provide a way to link our Web site to the app via an icon through a simple Web page. I create a page that has the app icons referenced in the top, but also uses the ancient “refresh” option: a browser waits a specified number of seconds and then redirects to a specified URL. Apps can have a URL schema name in iOS; The Magazine’s is the-magazine.

Thus, I created a page that, when visited, automatically redirects the browser instantly to the-magazine:// — this opens the app if it’s installed in iOS. That doesn’t seem useful, though, right? The point is to get an app icon on the home screen! Ah, but it does work. It just takes an extra step for the user.

Update (2014-04-28): Jason Snell:

Newsstand was one of iOS 5’s banner features when it was introduced back in 2011, but its time has come and gone. What was intended to be a special collection of apps has, instead, become a second-class collection. That’s why it would be better for everyone concerned—Apple, users, app developers, and publishers (including Macworld)—if Newsstand just vanished.

Recommended IMAP Providers

Benny Kjær Nielsen:

Recently I became aware of a couple of alternatives. This happened when a MailMate user was not satisfied with my standard Fastmail reply. Among his most interesting findings were Cotse.Net and LuxSci. They are interesting, because they use two of the most reliable IMAP server implementations. They use Dovecot and Panda, respectively. Dovecot is my personal favorite and it’s running on my own server. Panda was created by the inventor of IMAP, Mark Crispin.

iOS 7’s Design Inspiration

Buzz Andersen:

If this is true, and I suspect it is, I think it lends credence to what I’ve suspected all along: iOS 7 is not quite the coherent product of a forceful design vision that we’re led to believe, but rather a somewhat uneven and scattershot response to what Apple perceives as the general direction of its ecosystem as increasingly driven by independent developers.

Square Cash

Ellis Hamburger:

That’s the premise of Square Cash, launching today for all debit card users in the US, using any email service. To use Square Cash, all you do is compose an email to a friend, type the amount you way to pay in the subject title, and cc cash@square.com. If it’s your first time using the service, you’re directed to Square’s website where you type in your debit card number — and you’re done. There are no accounts to create, apps to download, friends to add, surcharges to pay, or bank account numbers to look up.

They also have an iOS app to help send the e-mail. It seems to genuinely be free, although PayPal started out that way, too.

Tuesday, October 15, 2013 [Tweets] [Favorites]

App Store Reviews

Garrett Murray:

Now let’s look at the most recent review from Jorge: Two stars with complaints that we don’t have support for exporting to Omnifocus (we do), no options for bigger fonts (we support the iOS 7 Dynamic Text setting so you can change your font size to whatever you want), no TextExpander support (but of course we have TE support), not worth the money. Every single bit of this review is inaccurate, but there it is in the US store, telling potential customers the app doesn’t do a bunch of stuff it does.

Demonstrably false reviews are actually not the ones that annoy me the most. Those would be the vague ones that allude to a certain feature being buggy, when many years and customers after that feature’s introduction, no one has ever reported any problems with it. So there’s no way for anyone to know that the feature probably does actually work. And, if there is a bug, there’s no way to detect and fix it.

KSURLComponents

Mike Abdullah:

I daresay Apple faced this same decision. NSMutableURL initially makes the most sense as a companion to all the NSMutableFoo classes in Foundation. But closer inspection reveals the awkward problem that many mutations cannot result in a valid URL. For example, trying to specify a relative path is only allowed if there’s no scheme or authority component. That then leaves our theoretical NSMutableURL class with having to throw exceptions, throw away data, or exist in some unusual invalid state when such a mutation is requested. And don’t even get started on handling URL schemes that don’t conform to RFC 1808

Instead, NSURLComponents — along the same lines as NSDateComponents — probably makes the most sense. All mutations are legal, and -URL will simply return nil until a valid combination of components is specified.

NSURLComponents is great, but it’s not available on Mac OS X 10.8 or iOS 6, hence his clone.

Reveal 1.0

Reveal is a Mac application that lets you inspect an instrumented iOS app while it runs on the device:

Reveal brings the power of tools like Firebug and Web Inspector to iOS developers. See your application’s view hierarchy at runtime with advanced 2D and 3D visualisations. Debug view layout and rendering problems in seconds.

Upgrade Pricing via Multiple Apps, URL Schemes, and I-AP

On Gabe Weatherhead’s site, Michael Burford of Headlight Software explains how they implemented upgrade pricing for FTP On The Go:

Apps can say they handle a “URL Scheme” so instead of http:// opening the web browser, fb:// will open the facebook app. Other apps can check if a particular scheme is supported. Our ftp apps just have their own scheme that can be checked.

Depending which if any the earlier FTP apps it finds, it shows the different in-app purchases as you saw :) As far as we know, we’re the first to do anything like this to offer discounted upgrades to previous owners.

The upgrade app itself is free but not fully functional. Then they offer an In-App Purchase to activate all the features, and the price for the I-AP varies depending on whether you have the previous version installed. There are currently five different versions of the app in the store.

We were as explicit about what we’re doing in the “Reviewer Notes” to Apple as we could be, even asking for a delayed higher level review. Even before activating, it can do quite a bit, many browsing and viewing tasks. If all you need is to view a file on an FTP server, you can do that in the free app.

It’s a clever solution for sure, but Apple is crazy if they think this sort of model is more customer friendly than supporting proper upgrades.

Thursday, October 10, 2013 [Tweets] [Favorites]

Schwartz 0.5

Schwartz, from Fake developer Todd Ditchendorf, is a shell for writing (and debugging!) Python scripts that use the Quartz 2D API. Great name and icon. You don’t need any boilerplate code to play around with Quartz; just implement a draw() function, and Schwartz displays the drawn image in a pane next to your code.

Touch ID and “Require Passcode: Immediately”

In talking about my iPhone 5s, I mentioned how when Touch ID is enabled it’s no longer possible to have a delay before the passcode (or Touch ID) is required. Dan Stillman goes into much more detail about the problems:

First, it greatly increases the number of times per day that Touch ID has to work. When functioning properly, Touch ID is remarkably accurate and a delight to use. Yet it still occasionally fails to read my thumb on the first one or two tries, and it’s stymied by moisture or dirt. If I were only authenticating as often as I used to enter my passcode, it would easily be a net win — after all, I didn’t always get my passcode right on the first try either. Having to authenticate on every unlock, though, anything short of 100% accuracy for the scanner quickly becomes tedious.

[…]

Unfortunately, with Touch ID enabled, sliding to unlock is now never sufficient on its own, meaning that you have to either enter the passcode or adjust your grip to reach all the way to the home button each time. If you’re waking your phone repeatedly — say, to check your position on a map, or to return to something you’re reading — this gets annoying quickly.

Requiring the passcode immediately also impairs basic iOS functionality: the ability to swipe across lock screen alerts in order to trigger actions. If you text someone via Messages, switch to Safari, lock the phone, and then receive a reply a few seconds later, unlocking via Touch ID will take you to Safari, not Messages. The same problem applies to any alert from an app that wasn’t the one you most recently used. The workaround is to slide across the lock screen alert to get to the passcode screen and then authenticate with Touch ID, but that’s an annoying extra step for people used to a passcode timeout, an unfortunate regression in usability for an action that people have done many times daily for years.

Wednesday, October 9, 2013 [Tweets] [Favorites]

Comparing the iOS 7 and iOS 6 Weather Apps

Nat!:

It’s interesting to see that iOS7 adds a “Mostly Sunny” to the UI, indicating some kind of indecision about the use of the background as a primary source of information. In terms of pixels painted, iOS7 makes more room for the background than the foreground, due to thinner fonts, smaller fonts and less space covered by graphics. The washed out look, further enhances the impression, that the background is supposed to be the most important past of the UI.

[…]

That this is the prominent example of the “iOS Human Interface Guidelines” for iOS6 to iOS7 conversion, leaves me wondering…

I like Check the Weather because it puts a greater emphasis on the information content. Unfortunately, like most iOS weather apps, it seems to have been designed by someone living in a snowless climate.

Update (2014-03-10): I’m not sure when it was added, but Check the Weather now shows the expected number of inches of snow.

Documentation in Xcode 5

Christopher Bowns shows how easy it is to add documentation that shows up in Xcode’s help panel and popovers. Great stuff. Unfortunately, the main Xcode documentation window is still pretty much a disaster. It is seemingly impossible to browse the available documents, and searching for non-API names rarely finds the matches I desire. Searching for information about Xcode itself or associated tools works particularly poorly. I’ve taken to keeping a separate folder of PDFs and Web archives for reference.

The Small Improvement in iPhone Battery Capacity

Dr. Drang:

It’s no secret that Apple has taken pains to make iPhones more and more stingy with power. What I didn’t appreciate until I put this table together was that the ability to still get a day of use out of an iPhone is due almost entirely to improvements in all the non-battery hardware and the software that drives it.

How to Keep App Store From Updating Old Versions of Xcode

Brian Webster:

If Spotlight can find an old version of Xcode, the App Store will happily update it. So, the trick you can use to prevent the App Store from doing so is to hide your old version(s) of Xcode from Spotlight.

GDB To LLDB Command Map

From the LLDB documentation (via Mark Aufflick):

Below is a table of GDB commands with the LLDB counterparts. The built in GDB-compatibility aliases in LLDB are also listed. The full lldb command names are often long, but any unique short form can be used.

Intellectual Ventures Sues Over CID/CVV Patent

Mike Masnick (via John Siracusa):

AmEx patented those little numbers on your credit card, and then for the good of the industry and consumer protection donated the patent to a non-profit, who promised not to enforce the patent against banks… and then proceeded to sell the patent to Intellectual Ventures who is now suing banks over it.

Update (2014-04-22): Joe Mullin:

Three other IV patents were dropped from the case at earlier stages of the litigation. One of them, No. 6,182,894, originated with research at American Express. IV lawyers said it covered the use of the three-digit CVV security codes on the back of credit cards, but in January they submitted a motion in which they “recognize that the claims, as written, are at risk of being found invalid,” and withdrew the patent.

Of course, some commentators wondered how a three-digit security code on the back of a credit card could be purchased at all. Perhaps in recognition of how terrible it would look suing over such a patent, AMEX donated the patent to a non-profit, the Consumer and Merchant Awareness Foundation (CMAF). The charity promised not to use the patent to sue “issuers, acquirers, merchants or consumers.” In 2009, patent office records show CMAF sold the patent to Intellectual Ventures.

“Offers In-App Purchases”

Nik Fletcher:

iOS 7 introduces a seemingly small, but very significant, addition to the IAP world - a digital receipt in every app (free or otherwise) that includes the version number when the customer originally bought the app.

With this new addition, for the first time it’s possible to move an app from paid-for to freemium (or lower-cost-with-IAP), whilst reliably ensuring the customer is able to access the features they originally bought. The receipt - something Mac developers already deal with on the Mac App Store - always returns the original version the customer purchased, even in the event of a reinstall.

Tuesday, October 8, 2013 [Tweets] [Favorites]

iPhone 5s First Impressions

I’ve been using an iPhone 5s for four days now. Overall, I really like it.

I was worried that, coming from a 4S, the increased height would be a problem. It’s actually been a pretty easy adjustment. The extra screen real estate makes a significant difference, yet the phone feels lighter. I wonder where the “too big” line is; a little extra width would make an even bigger difference in what I could see on the screen, but I suspect it would be less comfortable to hold and to stow.

It’s way faster than a 4S but nowhere near fast enough that performance stops mattering. I’m really glad I didn’t get a 5c. It still feels like I’m often waiting for the phone, though sometimes this is for animations or the network. Either iOS 7’s background fetching doesn’t work that well or many of my apps don’t support it yet.

The camera is terrific. It launches much faster, burst mode works well, and even HDR photos are pretty quick now. The photo quality is also improved.

Touch ID is nice, but it needs improvement. On the plus side, it has never accepted a finger that I didn’t train it with. However, it often fails to accept the two thumbs that I did train. My guess is that it only works 75% of the time on the first try. When trying to test it, it worked 20 times in a row several times. But in everyday use, it often fails three times in a row. If my thumb is sweaty, lotioned, or even slightly dirty, it often doesn’t work at all and I have to type my (now longer) passcode. It doesn’t seem to mind a bit of dampness from hand washing, however.

With the 4S, I only had to enter the passcode a few times per day—based on idle time, I suppose. With the 5s, I have to use Touch ID (or type the passcode) every time. When it works, Touch ID feels slower than swiping to unlock. I’m pretty sure it’s not actually slower, but that second or so where it’s scanning my thumb feels like a long time because I’m not doing anything. The delay is long enough that I feel like there should be some visual feedback that it’s actually scanning.

The Compass app’s level always shows 3-4° on known level surfaces—I keep a real level handy—and this is not consistent on the those same surfaces from day to day. I can also rotate the phone on a level table and have it vary by 3°.

Siri is still pretty much unusable when I’m out, even in areas with supposedly high signal strength. Either it waits a while before reporting that Siri is unavailable, or it takes a long time to process and then requires enough correction that it would have been faster for me to perform the task manually. It does work OK for setting timers when I’m at home on Wi-Fi.

Update (2013-10-09): Garrett Murray concurs on Touch ID:

Because I’m usually home all day every day, in the past I rarely had passcode turned on, and when I did it was set to a 2- or 5-minute delay, which meant infrequently passcode entry. With Touch ID, every single interaction with the phone requires the aforementioned touch, hold, wait pattern. Feels very slow.

Thursday, October 3, 2013 [Tweets] [Favorites]

1Password 4

1Password 4 is now available, with some great new features like multiple vaults, 1Password mini, security audit, favorites, and a better browser extensions user interface. I still don’t really like the idea of browser extensions, as there seems to be no way to audit where they are sending my information.

There’s much to like in the new interface, however:

The blog post mentions 96 beta releases and 20,000 beta testers, so I was surprised to find version 4.0 a little rough:

  1. Unlike in 1Password 3, text in Secure Notes is not fully searchable.
  2. The pop-up menu for changing vaults activates on mouse-up instead of mouse-down.
  3. The multiple vaults feature is not supported by the iOS app (or iCloud), and if you move your primary vault the iOS app won’t be able to find it.
  4. There’s no good way to move items between vaults. The Item ‣ Share menu looks like it will let you copy multiple items, but it only copies one at a time. You can export from one vault and import into another, but this entails writing all the decrypted data to your hard disk.
  5. The Basics section of the manual refers to an “In Depth” section that doesn’t seem to exist.
  6. The Preferences window simultaneously says that Dropbox is not running (with a button to install it) and that it is running.
  7. When I created a new vault, it continued to show the password detail pane for an item in my old vault.
  8. There was much talk earlier about the new Cloud Keychain format that’s more secure. However, 1Password 4 does not seem to actually be using this with Dropbox. Perhaps it’s only for iCloud? [Update: AgileBits support has confirmed this.]
  9. It can no longer export to a regular CSV file, only to its custom JSON-based format.

Update (2013-10-03): Not related to this release, but I wanted to note: 1Password users who have an iPad 1 are now out of luck. 1Password 3 for iOS uses the old Dropbox API that’s no longer functional. 1Password 4 for iOS requires iOS 6, so the iPad 1 can’t run it.

Update (2013-10-07): Some users are reporting data loss and other Dropbox sync problems. Dropbox syncing is not working well for me, either, since the update to 4.0. I’ve made changes on both my mac and iPhone that have not propagated to the other device.

Update (2013-10-08): The Dropbox syncing problems seem to be caused by a bug in its sandbox code:

10/8/13 10:15:16.012 AM 2BUA8C4S2C.com.agilebits.onepassword-osx-helper[191]: 400200 [SYNC:0x7fcba4255c20:<OPAgileKeychainSyncer (Dropbox) 0x7fcba40466a0>] E setupKeychainProfile | Cannot sync, failed to load keychain profile: Error Domain=com.agilebits.onepassword.ErrorDomain Code=100 "Failed to load profile" UserInfo=0x7fcbab813b10 {NSURL=file://localhost/Users/mjt/Dropbox/1Password.agilekeychain/data/default/.1password.keys?applesecurityscope=626663396665363865323330313061613433663164306265336362366163323738383463626332363b30303030303030303b303030303030303030303030303032303b636f6d2e6170706c652e6170702d73616e64626f782e726561642d77726974653b30303030303030313b30313030303030343b303030303030303030303139313339663b2f75736572732f6d6a742f64726f70626f782f3170617373776f72642e6167696c656b6579636861696e, NSLocalizedDescription=Failed to load profile, NSUnderlyingError=0x7fcbab806d30 "The file “.1password.keys” couldn’t be opened because you don’t have permission to view it."}
10/8/13 10:15:16.101 AM sandboxd[81765]: ([191]) 2BUA8C4S2C.com.a(191) deny file-read-data /Users/mjt/Dropbox/1Password.agilekeychain/data/default/1password.keys
10/8/13 10:15:16.122 AM sandboxd[81765]: ([191]) 2BUA8C4S2C.com.a(191) deny file-read-data /Users/mjt/Dropbox/1Password.agilekeychain/data/default/.1password.keys

Here’s another thread of other users having the problem. You can work around the bug by putting your 1Password.agilekeychain in ~/Dropbox/1Password.

Update (2013-11-09): I had a problem where some old bank accounts (probably from 1Password 2.x or 3.0 and last edited in 2009) were showing up blank in 1Password 4. At first I thought the data file was corrupted, but I found that I could view the bank information in 1Password Anywhere. So I think the problem was simply that 1Password 4 didn’t fully recognize items from an older format.

Update (2013-12-20): 1Password 4.1 restores the ability to search the notes. To do this, you have to select Search All Fields in the menu.

Wednesday, October 2, 2013 [Tweets] [Favorites]

Amazon Kindle Fire HDX 7-inch

Andy Ihnatko:

A new origami-style case adds to the bulk, but it’s a terrific design. Magnets inside the folding cover allow you to fold it back around for reading, or to click it into landscape or portrait tabletop mode, with your choice of two angles. And unlike the iPad’s Smart Cover, it won’t pop off when it shouldn’t: The Fire clicks into a stub and remains held in place by more magnets.

[…]

I don’t expect to see Apple lower the price of the 16GB iPad mini below its current $329. For the life of me, I don’t know what Apple could do to enhance the iPad mini to make me recommend it over the Fire HDX, provided that the person asking my advice had little interest in productivity or gaming. A 7-inch Fire HDX will give you a superior content experience and leave $100 in your pocket—which you can spend on books, music, and movies.

I’m surprised that the 7-inch Kindle Fire HDX is only 0.2 oz lighter (10.7 oz) than the 7.9-inch iPad mini (10.9 oz), which feels heavy compared with even my 8.5 oz Kindle 3. Put another way, both the Fire and the Mini are heavier than a current Kindle Paperwhite and an iPod touch combined.

Sustainability and the Mac App Store

Dan Counsell:

We honestly believe we build some of the best, most polished apps in the world. We sweat so many details, yet users are waiting for them to go on sale, simply because that’s the way things have been done. We now know that volatile pricing is not sustainable for us and wrong for so many reasons.

The audience on the Mac App Store is not yet large enough to sustain low prices (like the iPhone can, sometimes) – it’s just not feasible. If companies keep selling software at bargain basement prices without a large enough market, it doesn’t end well – they go out of business and if that happens, the very people who love great apps lose too.

Core Data Ensembles

Drew McCormack:

Ensembles extends Apple’s Core Data framework to add peer-to-peer synchronization for Mac OS and iOS. Multiple SQLite persistent stores can be coupled together via a file synchronization platform like iCloud or Dropbox. The framework can be readily extended to support any service capable of moving files between devices, including custom servers.

There doesn’t yet seem to be a detailed description of how it works. My impression is that it’s supposed to be the general Core Data iCloud approach, done right, and generalized to support other servers.

Update (2013-10-02): Drew McCormack:

In stark contrast to iCloud—Core Data, you also shouldn’t need to tear down your Core Data stack at any point just to accommodate Ensembles. Your NSManagedObjectContext can proceed unhindered, even when Ensembles has no connection to the cloud, or a catastrophic problem arises, such as the user changing cloud accounts. Syncing may terminate, but your app will go forth as though nothing happened.

And when your app is ready to reconnect to the cloud, Ensembles automatically migrates data to the cloud, so again, you are not required to play musical chairs with store files, and artificial migrations between stores, like you must when using iCloud—Core Data synchronisation.

[…]

We are dealing with a decentralised, peer-to-peer synchronisation model, where no device can assume it has the complete global state at any point in time. When merging a change set from a different device, it is often necessary to reapply changes from a change set that has already been merged, in order to guarantee eventual consistency.

[…]

A temporary background NSManagedObjectContext is created which shares the same SQLite store as the main context. Change sets are merged into this context, in order, with no regard to validity of the object graph. When it is time to commit the changes, a delegate method is invoked to give the host app an opportunity to apply any repairs that it wants to make before the data is sent to disk. A second delegate method is called if the background save fails, offering another opportunity to make repairs. Any repairs made by the application code are captured and added as a change set.

(This whole process is very much analogous to how a developer uses a DVCS like Git. Typically, you pull new versions from a server, and merge them with your local changes. If conflicts arise, you repair them, and commit these new changes, before pushing all local changes back to the server.)

Sounds like a good start. Unlike iCloud, the persistent store is never in an invalid state. It doesn’t yet support large blobs or compacting change sets.

Lifting the Lid on the iOS 7 UIPicker

Sean Woodhouse (via Mike Rundle):

As you can see from Marc’s diagram, you can no longer drag above and below the AM/PM column to move it. This is a huge pain because now you have to place your finger over the content in order to make your selection. In iOS 6 I’d often push or pull underneath the selected AM/PM value to change it. You’re also not able to tap the AM/PM or minute items to select them, which is completely inconsistent because you can tap the day and hour items!

Hopefully these were unintentional changes that will be fixed, because I’m finding the new picker difficult to use.