Archive for March 16, 2023

Thursday, March 16, 2023

Petey 1.1.2

Modum:

We are excited to introduce Petey your AI assistant app for the Apple Watch! With this app, you can now interact with the famous GPT model right from your wrist.

[…]

With Petey on your wrist, you can easily access a vast source of knowledge and communicate with an intelligent computer in real-time. It’s like having a personal assistant on your wrist!

Via John Gruber:

I’ve been using it for a week or so and it’s occasionally been genuinely handy, especially if you keep it on an easily-accessed watch face complication. With other devices, you can just search the web for answers to questions. Oftentimes, when you ask a question to Siri, you get redirected to a web search. But if all you have handy at the moment is your watch, a web search is useless. Petey gives good answers to a lot of questions.

Note that this is a watch-only app. It doesn’t even show an icon on iOS.

Ken Case:

It’s great that the developers […] don’t collect any data from their app. But is that App Store privacy label misleading, when ChatGPT itself collects everything you ever enter into it?

[…]

Apple’s guidance is pretty clear in stating that the app privacy label should identify “all of the data you or your third-party partners collect” (emphasis added).

So any app using ChatGPT really ought to be declaring ChatGPT’s data collection in that privacy label (unless the app meets all of Apple’s “optional disclosure” criteria, including being “not part of your app’s primary functionality”).

Previously:

Ventura Adds com.apple.provenance

Howard Oakley (Hacker News):

What happens in macOS Ventura is essentially the same until the moment that quarantine is cleared, when macOS now attaches a new extended attribute (xattr) of type com.apple.provenance to the file. This contains an 11-byte binary reference unique to that quarantine event, and may be protected by SIP to make it persist and prevent it from being stripped.

[…]

Defeating any SIP protection is simple for the user: when an app with a protected com.apple.provenance xattr is copied to another volume, the SIP protection breaks, and the xattr can be deleted in the normal way. However, code that tries to remove that xattr while it’s still protected may fail, and that has resulted in problems reported in Ventura by some users.

[…]

Randy has also identified the binary content of this new xattr as containing an 8-byte integer that is that app’s primary key in the provenance_tracking table in /var/db/SystemPolicyConfiguration/ExecPolicy. This would enable macOS to check the previous cdhash and other information about the app, perhaps to determine whether fuller checks are required by Gatekeeper, when the app is launched on subsequent occasions. That would make it a key part of Ventura’s new extended Gatekeeper checks.

Ethan Schoonover:

A small macOS improvement idea:

When I hit command-i on a macOS app, it would be nice if the app would include the website for the developer/application in the info or comments field.

I’ve forgotten about some apps that I’ve installed (i.e. i have no idea what they are even for) and would like to easily pop open the site for them without launching and hoping the URL is in help or about (or just manually searching online).

Howard Oakley:

While it’s clear that macOS Ventura is now tracking the provenance of apps that have completed their first run with the quarantine flag set, this provenance tracking doesn’t (yet) appear to be used to tailor or modify the checks run by Gatekeeper. It’s possible that provenance tracking isn’t yet mature enough to be used for that purpose, or that it’s intended for something else. Perhaps Ventura 13.3 will reveal more.

Previously:

Update (2023-05-11): Howard Oakley:

When the app is moved to a different enclosing folder, such as Applications, and is launched for the first time using the Finder, its xattrs change: the quarantine flag is cleared but left in place, a com.apple.macl xattr that’s protected by SIP is attached, and an unprotected com.apple.provenance xattr is also attached.

If the app is first launched from the same folder that it arrived in, that works differently, and no provenance xattr will be attached. Neither are provenance xattrs attached to documents.

[…]

On subsequent runs of that app, syspolicyd locates the previously stored provenance data, and updates it[…]

Peakto 1.5

CYME:

CYME adds annotation features to Peakto, the AI-powered photo meta-cataloger for macOS. Thanks to its wide compatibility–Lightroom, Luminar AI/Neo, Capture One and Apple Photos–Peakto allows photographers to annotate from the same interface thousands of images belonging to different photo editing software and different folders. This borderless annotation, which can be applied to hundreds of photo catalogs, complements Peakto’s automatic AI annotation that effortlessly assigns keywords and categories to images.

[…]

Peakto also recovers the annotations present in the original catalog and allows users to add new ones such as title, caption, author’s name, rights of use and legal mentions. Because Peakto is an AI-enhanced photo organizer, it offers photographers two options to find a specific shot or make image selections: (1) keywords describing the image content automatically assigned by the AI, and (2) the photographer’s personal notes. Peakto simplifies the sharing of the best images from a shoot, the creation of a thematic album or the selection of visuals for a book or portfolio.

I like the concept of an app that pulls together photos from different apps and provides an interface tuned for browsing, searching, and annotating. My main photo app is Lightroom Classic, but it doesn’t have AI searching and can’t show the map in the grid view. Peakto can give me these and other features without my having to give up Lightroom, which is great in many other respects.

This new version offers annotation roundtripping. Metadata that I add in Lightroom shows up in Peakto, and changes made in Peakto can be written to XMP sidecars (or HEIC/JPEG files) and then brought back into Lightroom. This is great but doesn’t seem quite ready for my purposes yet. Lightroom doesn’t automatically bring in the changes; you have to tell it to sync. And syncing only works with folders Peakto is set to watch, not with whole linked catalogs, and it’s not recommended for folders with Lightroom masters. CYME has plans to expand syncing with Lightroom and with other apps, and I will be following their progress with interest.

Previously:

Passing Types to Swift Functions

Paul Samuels:

This post uses a toy helper function that fetches remote JSON to show how we can design its api so that explicitly providing the type isn’t required when the compiler can infer types from context.

[…]

We can look at how JSONDecode.decode is defined to see how its api is designed. Clicking through the header we see

open func decode<T>(_ type: T.Type, from data: Data) throws -> T where T : Decodable

This is nothing new, but I wanted to document it here because I did not find this pattern obvious when I first learned it. My instinct from Objective-C was to pass in an AnyClass or perhaps an Any.Type, but that doesn’t work because there’s no way to convince the compiler that the return value will match the type received at runtime.

So you have to use generics. You could omit the type parameter and have the compiler infer T based on how the call site uses the return value, but that feels kind of backwards. Instead, using T.Type lets you go the other way and have T inferred from the parameter. This makes more sense, though it’s still a bit weird because you are passing in type but don’t really need it at runtime since you already have T.self.

With the latest change we have more flexibility but if feels like we’ve lost some brevity in cases where the compiler can infer things. To bring this type inference back we can use a default argument[…]