Archive for September 5, 2017

Tuesday, September 5, 2017

Injecting Missing Methods at Runtime

Vincent Bénony:

The important thing here is that most of the methods you’ll use are lazily bound. It means that instead of resolving the address of every method at loading time, the linker will write the address of a resolution method, and the effective resolution will be made the first time the method is used.


So, if a symbol is missing, how about resolving it by ourselves?

This is simpler than it sounds, and here is how we’ll proceed: we’ll parse the Mach-O header of the library, find where the lazy binding information is stored, find the symbol table, and replace the pointer in the __la_symbols_ptr section with our replacement code.

iOS Cropping in Photos

Dr. Drang:

The image has again resized itself to fill the editing area, but this time the adjustment has completely screwed up our intended edit. The upper crop marks have moved down and sliced into the top line of the paragraph we were intending to capture. This happened even though we never touched either of the upper crop handles during the second edit.

This behavior, which seems to be driven by how the aspect ratio of the image changes as you drag one of the crop handles, is thoroughly unintuitive. The handle at the opposite corner of the one you’re dragging should never move.

Google Maps Parking Features

Jeff Albertson:

To see how hard it might be to park where you’re headed, just get directions to your destination and look for the parking difficulty icon in the directions card at the bottom of the screen. Parking difficulties range from limited to medium to easy and are based on historical parking data with a little machine learning magic.

Since parking can be unpredictable, we’re rolling out the ability to find parking near your destination on Google Maps for Android.

In 25 US cities, people can tap “find parking” on the directions card to see a list of parking garages and lots near their destination. Once they tap their selected option, it’s automatically added to their trip. And they’ll even get walking directions from their parking spot to their final destination.

Hopefully the iOS version will catch up.

Update (2017-09-11): Sasha Blair-Goldensohn:

Starting today, we’re calling on Local Guides, a community of people who contribute their expertise about places on Google Maps, to add more wheelchair accessibility attributes to the map. If each of our tens of millions of Local Guides answers three of these questions every day for two weeks, we can gather nearly two billion answers to help people who rely on this information every day.

And wheelchair users aren’t the only ones who will benefit. You’ll also be making life easier for families with strollers, seniors with walkers, or anyone making plans with a friend who has impaired mobility.

Behind the Scenes of AMP at Condé Nast

Oscar Perez:

AMP increases the visibility and discoverability of our content by allowing it to be included in Google’s Top News Carousel, as well as improving the experience of regular Google search results.


We went live with Google AMP on Vanity Fair a little over a year ago. Post-launch, the traffic and search rank results were very positive: click through rate from Google search went from 5.9% (Regular) to 10.3% (AMP), and average search position went from 5.9 (Regular) to 1.7 (AMP). Since then, we have deployed AMP across fifteen of our brands and we have been very pleased with the results. Today, AMP accounts for 79% of our mobile search traffic and 36% of our total mobile visits.

Via Nick Heer:

AMP allows website owners a quick and relatively easy way to juice their search rankings. That’s all this is. There are certainly other ways to create a beautiful and fast website, but none of them get a website into the very prominent news carousel at the top of Google search result pages and Google News.


Just to be clear: AMP’s specifications require that pages link to this script: For a page to be valid AMP HTML, it must include that JavaScript file, which is hosted by Google.

Alex Kras (via Hacker News):

I understand that a lot of users DO like AMP content. I completely respect their right to enjoy it. But it would be nice if Twitter provided an option to opt-out from that experience for those who don’t.

For example, today I saw a post that David Walsh shared on Twitter. I clicked on the link, and was taken to the AMP version of his site. David has a very nice and easily recognizable blog. When I saw the content that looked different I had to pause. I wasn’t sure if I clicked on a phishing link or something else like that. Once I realized that it was just an AMP version of his site, I move on with my day. I wish I could opt-out from that experience.

How Is ARCore Better Than ARKit?

Matt Miesnieks (via Michael Love):

So in terms of how AR applications are really being used, any differences in calibration are pretty much impossible to detect. By the time developers are pushing the boundaries of the SDKs, Google is betting there will be a new generation of devices on the market with far more tightly integrated sensor calibration done at the factory.


ARCore has:

  • just enough extra features than ARKit that Apple can’t easily claim they’re better on paper
  • a few years of content experiments from Tango & Daydream that work on ARCore and are visibly more mature than what devs could build in a month or two of ARKit work
  • enough OEMs in the pipeline that they can claim similar reach “real soon”


I think as a technical solution they are very very close in capability. Effectively indistinguishable to users when it comes to the user experiences you can build today. ARKit has some tech advantages around hw/sw integration and more reliable tracking. ARCore has some advantages around mapping and more reliable recovery. Both of these advantages are mostly only noticeable by Computer Vision engineers who know what to look for.

David Sparks:

When iOS 11 ships (probably only a matter of weeks from now), augmented reality is, overnight, going to transform from a fringe technology to something installed on hundreds of millions of iOS devices.

Previously: Why Is ARKit Better Than the Alternatives?.