Archive for July 27, 2022

Wednesday, July 27, 2022

Photos Bug Could Share Albums with the Wrong People

Josh Centers:

Enter a name for the shared album. Then, click in the Invite People field and start typing a contact’s name. As you type, Photos automatically suggests entries from your contacts. So far, so good.

But let’s say you inadvertently hit the wrong key and press Delete to fix it—perhaps typing andy when your contact goes by andrew. As long as there are any autocomplete suggestions showing, instead of deleting the last character you typed, as you’d expect, Photos adds the top suggestion to the invite list! Which is exactly the opposite of what you wanted to do.

Touch ID on a Mac Desktop, Deconstructed

Jason Snell:

I want a mechanical keyboard and Touch ID!

[…]

I decided to attach some velcro tape on the keyboard and the bottom of my desk, positioning the keyboard so that the Touch ID sensor was at the very front of the underside of my desk.

[…]

I feel bad about using Karabiner to make a keyboard less productive, but that’s what I did: I re-mapped the keyboard’s keys to a useless function, so that mistyped keys will have no effect.

My experience has been that Touch ID is rarely useful on the Mac for anything except logging in, and that I can do with the Use your Apple Watch to unlock apps and your Mac option. Are there cases where you can use Touch ID but not an Apple Watch? Should there be?

I think when I try to Apple Pay it always sends the request to my phone.

Update (2022-07-28): Obviously, lots of people don’t have an Apple Watch, but I believe Snell is an Apple Watch user, and yet he was still motivated to do this to get access to Touch ID.

Update (2022-09-26): Jason Snell:

I’ve now done what I threatened to do at the end of that piece: I’ve broken into the keyboard, removed the important bits, and then reassembled it into a little 3-D printed case that contains just the Touch ID button.

Swift Tuple Overloads

Novall Swift:

Did you know with WeatherKit you can request any combination of data sets and it’s returned as a tuple?

This is great if you only need a subset of data!

Here I’m requesting to include the current weather and daily forecast, and I can extract just what I need.

[…]

let (current, daily) = try await WeatherService.shared.weather(for: location, including: .current, .daily)

Kyle Howells:

How is it doing this for 2,3+ items?

By just having 8 copies of the same method defined! Which also means 8 is props is your max.

[…]

If this sort of thing is something we are going to be living with for a while, then Apple needs to build in some sort of automatic coalescing into the documentation and Xcode auto complete because this is a very messy and confusing documentation experience.

Perhaps someday Swift will support variadic generics.

Previously:

Disappearing Safari Extensions

Jeff Johnson:

I’ve received a number of bug reports from customers saying that the extension doesn’t appear in Safari. And when my app calls the API [SFSafariApplication showPreferencesForExtensionWithIdentifier: completionHandler:] to show the extension in Safari Preferences, there’s an error “SFErrorDomain error 1”.

[…]

My command above forces Launch Services to re-register the Safari app. In order to diagnose the issue, I saved the output of lsregister -dump to a file both before and after re-registering Safari. When I compared the files, there were a number of differences, mostly trivial (e.g., timestamps), but one big difference stood out to me. The extension point com.apple.Safari.web-extension appeared in the “after” dump but not in the “before” dump[…]

[…]

I don’t know what caused the com.apple.Safari.web-extension extension point to become unregistered with Launch Services. That’s still a mystery. Obviously this appears to be some kind of OS bug that occurs on Big Sur but not Mojave.

Jeff Johnson:

If anything, the bug gotten worse. It’s happening to me rather frequently now. And it continues to happen to other Safari users, not just users of my Safari web extension Tweaks for Twitter, but to users of all Safari web extensions from every developer.

As a reminder, if your Safari web extensions have disappeared, you can restore them with a command in Terminal:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f -R /Applications/Safari.app

However, this command might not restore your extension data. I’ve found that in some cases, Safari not only forgets the extensions, it also erases the extension storage!

Previously: