Archive for September 18, 2014

Thursday, September 18, 2014

Xcode 6.0.1 Asynchronous Tests

The documentation only shows one type of XCTestExpectation, but there are actually several different methods for creating them:

@interface XCTestCase (AsynchronousTesting)
- (XCTestExpectation *)expectationWithDescription:(NSString *)description;
- (XCTestExpectation *)keyValueObservingExpectationForObject:(id)objectToObserve 
                                                     keyPath:(NSString *)keyPath 
                                               expectedValue:(id)expectedValue;
- (XCTestExpectation *)keyValueObservingExpectationForObject:(id)objectToObserve 
                                                     keyPath:(NSString *)keyPath 
                                                     handler:(XCKeyValueObservingExpectationHandler)handlerOrNil;
- (XCTestExpectation *)expectationForNotification:(NSString *)notificationName 
                                           object:(id)objectToObserve 
                                          handler:(XCNotificationExpectationHandler)handlerOrNil;
@end

These are documented in XCTextCase+AsynchronousTesting.h.

Kindle Voyage

Kirk McElhearn:

Amazon has announced a new Kindle, the Kindle Voyage (odd name…) that is due to ship in November. (Amazon.com, Amazon UK) A bit smaller than the Kindle Paperwhite, this device boasts a higher screen resolution (300 ppi compared to 212 pip for the Paperwhite), and an adaptive light, so the screen light will vary according to your ambient lighting. There are also page-turn buttons in the device’s frame, on either side of the page, which provide haptic feedback.

I’m glad they added the page-turning buttons back.

Update (2014-09-19): Marco Arment:

You know what else is a pressure-based sensor with haptic feedback? A button.

Jason Snell:

Backlit tablets just can’t compete with E-Ink-equipped Kindles when it comes to reading in the bright sun. One of these days, maybe Apple will figure out how to make a glareless iPad with a really bright backlight for outdoor reading, but until that day I’m Kindle all the way.

At night, the inverse applies. My Paperwhite, turned down all the way, is much darker than my iPad’s backlight at the lowest setting. Which means it’s much less likely to disturb my wife while she’s sleeping and I’m reading.

Whether dark or light or in between, I prefer reading on these devices. They never push notifications at me, I’m never tempted to switch over to Twitter or email, and the static black-and-white calm of words on a page evokes the best things about reading a paper book or newspaper.

Update (2014-11-07): Marco Arment:

Rather than approximating buttons, the Voyage’s overly complicated “pressure-based page turn sensors with haptic feedback” are the worst of both worlds: they lack the precision, feedback, and intentionality of buttons, and they take more effort and are smaller than touch targets.

Jason Snell:

The Kindle Voyage is a premium reader at a premium price, targeting people who love their Kindles so much that they won’t hesitate to spend $200 for the best Kindle they can buy. It’s a smart decision, I think, and the Voyage is an excellent product.

That all said, I have to admit that of all the Kindle upgrades I’ve done over the years, this one felt the least significant. The screen is better, but the Paperwhite screen was already quite good. It’s good to have buttons again, but the accidental touches I make on the screen adjacent to the buttons somewhat reduce my enthusiasm for that feature. The typography is unchanged and mediocre.

Update (2014-11-22): Lukas Mathis:

Apart from the screen itself, every single generation of new Kindles was worse than the previous one.

1Password 5: Touch ID and Safari/App Extensions

As I said, I was really excited about this. So far, it has not quite worked out the way I expected.

The Safari extension prompts me for my master password every single time, even though I have set the master password timeout to 30 days.

The app itself sometimes lets me in via Touch ID but usually asks for my master password. I understand that the app needs to be running in order to keep the master password in RAM, but something doesn’t seem right here. It happens even in situations where it seems impossible for the app to have been quit by the OS.

There is an option in the Advanced preferences to store the master password in the iOS keychain. This seems like it would address the problem, but it also seems potentially dangerous. It shouldn’t be necessary unless there is a memory shortage.

In Riposte (which I’m trying since Netbot crashes on iOS 8), there is indeed a button to access 1Password and search for “app.net”. However, there didn’t seem to be a way to get it to enter the username and password; I had to copy and paste them.

Surprisingly, 1Password lets me use third-party keyboards to type usernames and passwords, though not the master password.

Update (2014-09-23): I heard back from AgileBits support. The main issue seems to be that (a) a new instance of the 1Password extension is launched each time it’s used, so it cannot remember anything between invocations, and (b) the extension cannot communicate with the running 1Password app to get the master password. Therefore, the extension will prompt for the master password every time unless you enable the option in the 1Password app to store the master password in the iOS keychain.

Update (2014-10-04): Even when using the option to store the master password in the iOS keychain, I am finding that the 1Password app pretty regularly prompts me to enter the master password instead of offering me Touch ID.

iOS 8 Keyboards

Fleksy (App Store)

What I like about this keyboard is that it lets you swipe left to delete an entire word, swipe right to type a space, and swipe up or down to choose among word predictions. You can add or remove words from its dictionary. You can also adjust the size of the keyboard and even omit the spacebar. Languages and personalization require “Allow Full Access.”

SwiftKey (App Store)

Word predictions and the Flow feature for swiping require “Allow Full Access.” I did not enable that, so it didn’t seem to offer much. They want you to use their cloud service and send them data to get more accurate results.

Swype (App Store)

It’s amazing how accurate this is when you swipe your finger around without lifting it. There are also some interesting gestures for punctuation and capitalization, and you can control its dictionary. This keyboard does not even ask for “Allow Full Access.”

TextExpander touch (App Store)

It’s great to be able to expand abbreviations. Unfortunately, as I said, this means that you have to forego the other keyboards that are better at typing. You do have to enable “Allow Full Access.”

I think the Allow Full Access setting is confusing. It seems to be asking whether I want the keyboard to be able to persist data. That sounds useful and harmless. What I really want is to prevent the keyboard (via the app) from sending my data over the network. There doesn’t seem to be a way to do that except by not allowing full access.

See also: Federico Viticci, Scott Hanselman, Allyson Kazmucha.

Update (2014-09-19): Tim Burks:

It would be nice to be able to offer extended features without scaring consumers and looking shady.

Gabe Weatherhead:

My interpretation of the documentation is that a keyboard extension can enable network access if it is for the purpose of improving the application. What improvements warrant this, is up to the app developer.

[…]

But the only gate keeper is the app approval process. While that has kept iOS comfortably safe for me, the additional benefit of a new keyboard does not warrant this added risk.

Update (2014-09-21): By default, Swype backspaces over a whole word; to delete just one character, you can type a space and then backspace twice. I have not found a good way of typing words with apostrophes in them, since the apostrophe is not on the main keyboard.

Update (2014-10-10): Josh Centers:

Apple needs to give developers access to the keyboard selection popover so users can switch between keyboards quickly, and it should specify a location, name, and icon for the key that switches keyboards. Under the current rules, switching keyboards could technically be done via a gesture, leaving users to guess even more than they already have to.

Second, there are many more keyboard resources Apple could open up to developers, like iOS 8’s auto-correction and text-prediction mechanisms. As it stands, developers have to recreate every keyboard feature from scratch, which makes keyboards look and work significantly differently from the standard iOS 8 keyboard and thus hurts the user experience unnecessarily. Ideally, an app could use the standard keyboard as a jumping-off point, and change only the desired functionality, rather than start from scratch.

Third, I’d like to see better privacy controls for keyboards. Perhaps I’m just paranoid because I’m not accustomed to the possibility of my keystrokes being recorded, but right now, you have the choice between letting developers do anything and having a partially functional keyboard. I’d like to see more granular privacy settings for keyboard container apps.

Gatekeeper and Mac OS X 10.9.5

Daniel Jalkut:

Many Mac developers dropped everything to re-sign apps like Apple asked for 10.9.5, only to learn it doesn’t matter. Terrible communication.

Daniel Jalkut:

A bit over a month ago, Apple announced big changes to the way Mac OS X versions 10.9.5 and 10.10 will recognize the code signatures of 3rd party applications, hinting very strongly that consequences would be dire for any developer neglecting to re-sign their apps:

[…]

To make matters yet more confusing, a developer who has signed off on the chore of complying with Apple’s requests would not necessarily be able to verify the job was done right, because for example on pre-release builds of 10.9.5 and 10.10, many apps with “old and busted” version 1 signatures unexpectedly passed the system’s Gatekeeper check, contrary to the firm indication from Apple that they shouldn’t.

It’s still not entirely clear to me what happened here. I had an app that failed the Gatekeeper check with pre-release versions of the OS only to pass it with later betas and the release version. Was this because of a bug in the pre-release versions? Or is Apple simply delaying part of the clamp-down?

See also: Major Changes to Gatekeeper in Mac OS X 10.9.5.

Update (2014-09-19): Andrew Cunningham:

This is contrary to a message Apple sent to developers in early August, which indicated that all apps would need to be re-signed to work properly with 10.9.5.

Update (2014-09-24): Jeff Johnson:

What nobody was expecting, and as far as I can tell, what nobody but me has noticed yet, is that the Gatekeeper change, or a significant subset thereof, was included with the 2014-004 Security Update for Mac OS X 10.8.5. There is no mention of this at all by Apple, anywhere, certainly not in the release notes.

[…]

It’s shameful that Apple failed to inform anyone, either developers or users, either before or after the fact, that this significant overhaul of Gatekeeper shipped in the security update to 10.8.5. And since it was a security update, we have to wonder, what was the security vulnerability? Why wasn’t it listed in the security content for 10.8.5 or 10.9.5? According to the hype, Apple is supposedly entering into a new era of openness. According to the reality, however, I see the same old lack of communication.

Thoughts on Privacy

Tim Cook:

Our business model is very straightforward: We sell great products. We don’t build a profile based on your email content or web browsing habits to sell to advertisers. We don’t “monetize” the information you store on your iPhone or in iCloud. And we don’t read your email or your messages to get information to market to you. Our software and services are designed to make our devices better. Plain and simple.

John Gruber:

That Tim Cook and Steve Jobs are very different people has been a common refrain for three years, and it came up again this week in his interview with Charlie Rose. But one trait they share is the ability to write in simple, straightforward words. I say clear writing is a sign of clear thinking.

Apple:

Below you’ll find information about powerful features that help you make your devices and data secure, along with tips for avoiding phishing scams and keeping your account safe.

Apple:

Government information requests are a consequence of doing business in the digital age. We believe in being as transparent as the law allows about what information is requested from us. In addition, Apple has never worked with any government agency from any country to create a “back door” in any of our products or services. We have also never allowed any government access to our servers. And we never will.

In the Charlie Rose interview, Cook said they would have to carry him out in a box before he let that happen. Of course, it is entirely possible that it could happen without his knowledge or consent. The systems are designed such that Apple could tap into your messages if it wanted to. There is unfortunately no way to prove that this doesn’t happen.

I also note that Apple has updated its iOS Security whitepaper.

Update (2014-09-18): Jeff John Roberts (via David Heinemeier Hansson):

Now, Apple’s warrant canary has disappeared. A review of the company’s last two Transparency Reports, covering the second half of 2013 and the first six months of 2014, shows that the “canary” language is no longer there.

Update (2014-09-19): Cyrus Farivar:

While Apple won’t confirm it, the company has removed its warrant canary from its latest transparency report, issued this week. While this could mean that the company has received a new secret government order to provide user data, there is still another more likely possibility: it’s not publishing warrant canaries at all.

Apps Using iOS 8 Extensions

Panic:

Up until that point, iOS apps had very limited reach in terms of access to other apps’ documents, so we struggled to find an answer to our time-honored litmus test of “what would we use this for?” Was an app that simply allowed you to transfer files in and out of itself particularly useful?

[…]

By utilizing App Extensions, Transmit could effectively provide standard file transfer protocols for any iOS 8 app. Overnight, this idea that made very little sense suddenly made all the sense in the world.

Instapaper:

As of today, you can easily save to Instapaper from any application on your iPhone or iPad that supports the iOS system share sheet. No more copying links & opening Instapaper, emailing yourself articles, or installing bookmarklets. Just tap the system share icon, choose Instapaper, and voila! Saved.

Facebook’s iOS Infrastructure

Adam Ernst and Ari Grant gave a presentation at @Scale 2014 about why Facebook switched away from Core Data and MVC to immutable models and their own layout engine that separates the layout from the process of creating the view hierarchy from recycled immutable views.