Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Say what is true of an extension's state, and keep a version's app in its row
Țugui Dragoș1eb99f134a16
diff --git a/GUIDE.md b/GUIDE.mdindex dbee707d..a3a51cb0 100644--- a/GUIDE.md+++ b/GUIDE.md@@ -262,9 +262,9 @@ and how many items the others hold.the Trash. A job an app gave launchd itself, such as an update's installer, says so. Apps set to open at login arein System Settings > General > Login Items & Extensions, not here.- **Extensions:** app extensions and system extensions, the app each one came with and whether it is still installed,- the choice made for each one, or that macOS decides when nobody chose, and where it is turned on or off: System- Settings for most, Safari > Settings > Extensions for a Safari extension, which Safari alone shows the state of, Edit- Widgets for a widget, and nowhere for what Shortcuts and Siri use.+ the choice made for each one, or that macOS decides when nobody chose, which keeps a Finder extension off, and where+ it is turned on or off: System Settings for most, Safari > Settings > Extensions for a Safari extension, which Safari+ alone shows the state of, Edit Widgets for a widget, and nowhere for what Shortcuts and Siri use.- **Plug-ins:** the plug-ins in the Library folders made for them, from audio units and camera plug-ins to Quick Look,each with the app it came with, as Orphaned Files tells it, and each of which you can move to the Trash, after Peelwarns that apps using it may stop working, says that macOS loads a camera plug-in only once legacy video devicediff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex 3fa1fa3c..ed2cc1e7 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -78886,6 +78886,112 @@}}},+ "Its app is gone, so there is nothing to allow. Turning It On and Off, below, says what is left to do." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Jeho aplikace už tu není, takže není co povolovat. Co zbývá udělat, uvádí níže část Zapínání a vypínání."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Die zugehörige App ist nicht mehr vorhanden, daher gibt es nichts zu erlauben. „Aktivieren und Deaktivieren“ weiter unten sagt, was noch zu tun ist."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Su app ya no está, así que no hay nada que permitir. “Activación y desactivación”, más abajo, indica lo que queda por hacer."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Son app a disparu : il n’y a donc rien à autoriser. La section « Activation et désactivation », ci-dessous, indique ce qu’il reste à faire."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "La sua app non c’è più, quindi non c’è nulla da autorizzare. “Attivazione e disattivazione”, qui sotto, indica cosa resta da fare."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "アプリがなくなっているため、許可するものはありません。残りの作業については、以下の“オン/オフの切り替え”を確認してください。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "앱이 사라졌으므로 허용할 대상이 없습니다. 아래의 ‘켜기 및 끄기’에서 남은 작업을 확인할 수 있습니다."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "De bijbehorende app is weg, dus er valt niets toe te staan. Hieronder, bij 'In- en uitschakelen', staat wat er nog moet gebeuren."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Jego aplikacji już nie ma, więc nie ma na co pozwalać. Sekcja Włączanie i wyłączanie poniżej wyjaśnia, co pozostało do zrobienia."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O app dela não existe mais, então não há nada para permitir. A seção Ativar e Desativar, abaixo, diz o que resta fazer."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Aplicația sa nu mai există, așa că nu este nimic de permis. Secțiunea „Activare și dezactivare”, de mai jos, spune ce mai este de făcut."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Его приложения больше нет, поэтому разрешать нечего. В разделе «Включение и выключение» ниже сказано, что осталось сделать."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Appen är borta, så det finns inget att tillåta. Avsnittet ”Slå på och stänga av” nedan talar om vad som återstår att göra."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Uygulaması artık yok, bu yüzden izin verilecek bir şey yok. Aşağıdaki Açma ve Kapatma bölümü, yapılacak ne kaldığını söyler."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Його програми вже немає, тож дозволяти нічого. Розділ «Увімкнення і вимкнення» нижче пояснює, що лишилося зробити."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "它的App已不存在,因此没有什么需要允许的。下方的“打开与关闭”说明了还需要做什么。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "它的App已不存在,因此沒有可允許的項目。下方的「開啟與關閉」會說明還需要做什麼。"+ }+ }+ }+ },"Its app is in the Trash, and macOS starts it from there each time you log in, until you empty the Trash." : {"localizations" : {"cs" : {@@ -249183,6 +249289,112 @@}}},+ "macOS keeps a Finder extension off until someone turns it on." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Systém macOS nechává rozšíření Finderu vypnuté, dokud ho někdo nezapne."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS lässt eine Finder-Erweiterung deaktiviert, bis jemand sie aktiviert."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS mantiene desactivada una extensión del Finder hasta que alguien la activa."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS laisse une extension du Finder désactivée jusqu’à ce que quelqu’un l’active."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS mantiene disattivata un’estensione del Finder finché qualcuno non la attiva."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOSは、誰かがオンにするまでFinder機能拡張をオフのままにします。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS는 누군가 켜기 전까지 Finder 확장 프로그램을 꺼 둡니다."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS houdt een Finder-extensie uitgeschakeld totdat iemand die inschakelt."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS pozostawia rozszerzenie Findera wyłączone, dopóki ktoś go nie włączy."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O macOS mantém uma extensão do Finder desativada até que alguém a ative."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS păstrează o extensie Finder dezactivată până când cineva o activează."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS оставляет расширение Finder выключенным, пока кто-нибудь его не включит."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS håller ett Finder-tillägg avstängt tills någon slår på det."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS, bir Finder genişletmesini biri açana kadar kapalı tutar."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS тримає розширення Finder вимкненим, доки хтось його не ввімкне."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "在有人打开访达扩展之前,macOS会让它保持关闭。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS會讓Finder延伸功能保持關閉,直到有人將它開啟。"+ }+ }+ }+ },"macOS keeps a receipt of the files a package installed. The ones outside the app are listed here only to show them: other software may rely on them. If Peel also found one of them for this app, it appears in the lists above as well, and may be selected there. Forgetting a receipt, from the page’s More menu, moves it to the Trash: macOS stops counting the package as installed, and the files stay where they are." : {"comment" : "The note behind the circled i of the Installed by a Package section on an app's page. More is the menu at the top of the page.","localizations" : {diff --git a/Peel/Views/Extensions/ExtensionDetailView.swift b/Peel/Views/Extensions/ExtensionDetailView.swiftindex bc9b9d21..bc0fd48d 100644--- a/Peel/Views/Extensions/ExtensionDetailView.swift+++ b/Peel/Views/Extensions/ExtensionDetailView.swift@@ -71,9 +71,9 @@ struct ExtensionDetailView: View {}if item.showsItsState {LabeledContent {- Text(item.election.title)+ Text(item.shownElection.title)} label: {- heading("State", item.election.explanation)+ titled("State", item.stateExplanation)}}if let reported = item.reportedState {diff --git a/Peel/Views/Extensions/ExtensionList.swift b/Peel/Views/Extensions/ExtensionList.swiftindex bf8ae598..335c4964 100644--- a/Peel/Views/Extensions/ExtensionList.swift+++ b/Peel/Views/Extensions/ExtensionList.swift@@ -111,20 +111,17 @@ private struct ExtensionRow: View {Text(verbatim: item.name).lineLimit(1)} details: {- if showsVersion, let version = item.shownVersion {- Text("Version \(version)")- .lineLimit(1)- } else if let detail = item.rowDetail {+ if let detail = item.rowDetail(showingVersion: showsVersion) {Text(verbatim: detail).lineLimit(1)}} trailing: {- if item.showsItsState, item.election != .asItCame {+ if item.showsItsState, item.shownElection != .asItCame {Group {- if let mark = item.election.mark {- StatusLabel(title: Text(item.election.title), systemImage: mark, tint: .accentColor)+ if let mark = item.shownElection.mark {+ StatusLabel(title: Text(item.shownElection.title), systemImage: mark, tint: .accentColor)} else {- Text(item.election.title)+ Text(item.shownElection.title)}}.font(.caption)diff --git a/Peel/Views/Extensions/ExtensionText.swift b/Peel/Views/Extensions/ExtensionText.swiftindex ca7529a5..ff081ad2 100644--- a/Peel/Views/Extensions/ExtensionText.swift+++ b/Peel/Views/Extensions/ExtensionText.swift@@ -24,6 +24,28 @@ extension AppExtension {return pointName}+ /// `rowDetail`, with the version beside it when another row has this identifier, as during an update.+ func rowDetail(showingVersion: Bool) -> String? {+ let version = showingVersion ? shownVersion.map { String(localized: "Version \($0)") } : nil+ let parts = [rowDetail, version].compactMap(\.self)+ return parts.isEmpty ? nil : parts.joined(separator: " · ")+ }++ /// The state to show. macOS keeps a Finder extension off until someone turns it on (`FIFinderSyncController`), so+ /// for one nobody chose, off is what is true, as Home reads it.+ var shownElection: Election {+ election == .asItCame && point == "com.apple.FinderSync" ? .off : election+ }++ var stateExplanation: LocalizedStringResource {+ if election == .waitingForApproval, goneApp != nil {+ return "Its app is gone, so there is nothing to allow. Turning It On and Off, below, says what is left to do."+ }+ return election == .asItCame && shownElection == .off+ ? "macOS keeps a Finder extension off until someone turns it on."+ : election.explanation+ }+/// Whether a search for `text` finds it, by what its row and page say as well as by its identifiers.func matches(_ text: String) -> Bool {[name, owner, pointName, categoryName, point, identifier].contains {diff --git a/Peel/Views/Space/SpaceDetailView.swift b/Peel/Views/Space/SpaceDetailView.swiftindex 73073bac..cf35e2b0 100644--- a/Peel/Views/Space/SpaceDetailView.swift+++ b/Peel/Views/Space/SpaceDetailView.swift@@ -44,7 +44,7 @@ struct SpaceDetailView: View {.multilineTextAlignment(.trailing)}} label: {- heading(+ titled("How to free it","Space doesn’t touch this: the app that made it knows what is still needed.")diff --git a/PeelTests/ExtensionTextTests.swift b/PeelTests/ExtensionTextTests.swiftindex 4974ac14..f2dc6265 100644--- a/PeelTests/ExtensionTextTests.swift+++ b/PeelTests/ExtensionTextTests.swift@@ -65,6 +65,51 @@ struct ExtensionTextTests {#expect(system("com.apple.system_extension.cmio").matches(word))}+ @Test func aSystemExtensionWhoseAppIsGoneHasNothingToAllow() {+ func system(goneApp: String?) -> AppExtension {+ AppExtension(+ identifier: "org.example.part", name: "Part", kind: .systemExtension, point: nil, owner: nil,+ url: nil, election: .waitingForApproval, teamIdentifier: nil, reportedState: nil, goneApp: goneApp+ )+ }++ #expect(system(goneApp: nil).stateExplanation.key == AppExtension.Election.waitingForApproval.explanation.key)+ #expect(system(goneApp: "/Applications/Example.app").stateExplanation.key != system(goneApp: nil).stateExplanation.key)+ }++ @Test func aFinderExtensionNobodyChoseIsOff() {+ let finder = AppExtension(+ identifier: "org.example.finder", name: "Part", kind: .appExtension, point: "com.apple.FinderSync",+ owner: "Example", url: nil, election: .asItCame, teamIdentifier: nil, reportedState: nil+ )+ let other = part(name: "Part", owner: "Example", point: "com.apple.share-services")+ let chosen = AppExtension(+ identifier: "org.example.finder", name: "Part", kind: .appExtension, point: "com.apple.FinderSync",+ owner: "Example", url: nil, election: .on, teamIdentifier: nil, reportedState: nil+ )++ #expect(finder.shownElection == .off)+ #expect(chosen.shownElection == .on)+ #expect(other.shownElection == .on)+ #expect(finder.stateExplanation.key != AppExtension.Election.off.explanation.key)+ }++ @Test func aRowOfOneVersionAmongTwoKeepsItsAppBesideItsVersion() {+ func version(goneApp: String?, owner: String?) -> AppExtension {+ AppExtension(+ identifier: "org.example.part", name: "Part", kind: .systemExtension, point: nil, owner: owner,+ url: nil, election: .on, teamIdentifier: nil, reportedState: nil, goneApp: goneApp, version: "2.0/200"+ )+ }+ let installed = version(goneApp: nil, owner: "Example")+ let gone = version(goneApp: "/Applications/Example.app", owner: nil)+ let words = String(localized: "Version \("2.0 (200)")")++ #expect(installed.rowDetail(showingVersion: false) == "Example")+ #expect(installed.rowDetail(showingVersion: true) == "Example · \(words)")+ #expect(gone.rowDetail(showingVersion: true) == "\(String(localized: "\("Example"), no longer installed")) · \(words)")+ }+@Test func findsAPartByTheWordItsPageShows() throws {let widget = part(name: "Example", owner: "Example", point: "com.apple.widgetkit-extension")let word = try #require(widget.pointName)