Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Say that a browser's web app stays in its browser

Țugui Dragoș3d5db1827d6c
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index 51b40e40..b1e03f22 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -9551,6 +9551,112 @@
}
}
},
+ "A web app of %@" : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Webová aplikace prohlížeče %@"
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Eine Web-App von %@"
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Una app web de %@"
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Une app web de %@"
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Un’app web di %@"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@のWebアプリ"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@의 웹 앱"
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Een webapp van %@"
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Aplikacja internetowa przeglądarki %@"
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "App web do %@"
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Aplicație web din %@"
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Веб-приложение браузера %@"
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "En webbapp från %@"
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ web uygulaması"
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Вебпрограма браузера %@"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@的网页App"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@的網頁App"
+ }
+ }
+ }
+ },
"A whole home folder or disk is too much to search. Choose the folder your projects are in." : {
"localizations" : {
"cs" : {
@@ -73498,6 +73604,118 @@
}
}
},
+ "Moving it to the Trash takes away only this shortcut, and the app stays in %@, which can make the shortcut again. To remove the app itself, uninstall it in %@, which takes the shortcut away too." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Přesunutím do koše odstraníte jen tohoto zástupce a aplikace zůstane v %1$@, který zástupce dokáže znovu vytvořit. Chcete-li odstranit samotnou aplikaci, odinstalujte ji v %2$@, čímž zmizí i zástupce."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Wird sie in den Papierkorb gelegt, verschwindet nur diese Verknüpfung, und die App bleibt in %1$@, das die Verknüpfung erneut erstellen kann. Um die App selbst zu entfernen, deinstallieren Sie sie in %2$@. Dabei verschwindet auch die Verknüpfung."
+ }
+ },
+ "en" : {
+ "stringUnit" : {
+ "state" : "new",
+ "value" : "Moving it to the Trash takes away only this shortcut, and the app stays in %1$@, which can make the shortcut again. To remove the app itself, uninstall it in %2$@, which takes the shortcut away too."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Al trasladarla a la papelera solo se elimina este acceso directo, y la app sigue en %1$@, que puede volver a crear el acceso directo. Para eliminar la app, desinstálala en %2$@, que también elimina el acceso directo."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "La placer dans la corbeille ne retire que ce raccourci, et l’app reste dans %1$@, qui peut recréer le raccourci. Pour supprimer l’app elle-même, désinstallez-la dans %2$@, ce qui retire aussi le raccourci."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Spostarla nel Cestino rimuove solo questo collegamento, e l’app resta in %1$@, che può creare di nuovo il collegamento. Per rimuovere l’app, disinstallala in %2$@, che rimuove anche il collegamento."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "ゴミ箱に入れても取り除かれるのはこのショートカットだけで、アプリは%1$@に残り、ショートカットを再作成できます。アプリ自体を取り除くには、%2$@でアンインストールしてください。ショートカットも一緒に取り除かれます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "휴지통으로 이동하면 이 바로가기만 제거되고 앱은 %1$@에 남아 바로가기를 다시 만들 수 있습니다. 앱 자체를 제거하려면 %2$@에서 제거하십시오. 바로가기도 함께 제거됩니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Als je hem naar de prullenmand verplaatst, verdwijnt alleen deze snelkoppeling, en de app blijft in %1$@, dat de snelkoppeling opnieuw kan maken. Om de app zelf te verwijderen, deïnstalleer je hem in %2$@, waarbij ook de snelkoppeling verdwijnt."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Przeniesienie do Kosza usuwa tylko ten skrót, a aplikacja pozostaje w %1$@, która może ponownie utworzyć skrót. Aby usunąć samą aplikację, odinstaluj ją w %2$@, co usuwa też skrót."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Movê-lo para o Lixo remove apenas este atalho, e o app continua no %1$@, que pode criar o atalho de novo. Para remover o app, desinstale-o no %2$@, o que também remove o atalho."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Mutarea în Coș elimină doar această scurtătură, iar aplicația rămâne în %1$@, care poate crea din nou scurtătura. Pentru a elimina aplicația însăși, dezinstalați‑o din %2$@, ceea ce elimină și scurtătura."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Перемещение в Корзину удаляет только этот ярлык, а приложение остается в %1$@, который может снова создать ярлык. Чтобы удалить само приложение, удалите его в %2$@, и ярлык тоже исчезнет."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Om du flyttar den till papperskorgen tas bara den här genvägen bort, och appen finns kvar i %1$@, som kan skapa genvägen igen. Om du vill ta bort själva appen avinstallerar du den i %2$@, vilket även tar bort genvägen."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Çöp Sepeti’ne taşımak yalnızca bu kısayolu kaldırır, uygulama %1$@ içinde kalır ve kısayolu yeniden oluşturabilir. Uygulamanın kendisini kaldırmak için %2$@ içinde yüklemesini kaldırın, bu kısayolu da kaldırır."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Переміщення в Смітник вилучає лише цей ярлик, а вебпрограма лишається в %1$@, який може знову створити ярлик. Щоб вилучити саму вебпрограму, деінсталюйте її в %2$@, і ярлик теж зникне."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "移到废纸篓只会移除此快捷方式,App仍保留在%1$@中,并可重新创建快捷方式。若要移除App本身,请在%2$@中将其卸载,快捷方式也会一并移除。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "丟到垃圾桶只會移除此捷徑,App仍會保留在%1$@中,並可重新建立捷徑。若要移除App本身,請在%2$@中將其解除安裝,捷徑也會一併移除。"
+ }
+ }
+ }
+ },
"Muted Updates" : {
"localizations" : {
"cs" : {
diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift b/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift
index b3e12a2c..ee640656 100644
--- a/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift
+++ b/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift
@@ -396,6 +396,21 @@ struct UninstallCommand: AsyncParsableCommand {
return failure.description
}
+ /// What the plan says of a browser's web app, whose shortcut is all that moves: the app stays in the browser.
+ static func webAppNote(for app: InstalledApp, browserName: String) -> String? {
+ guard case .browser = app.webApp else { return nil }
+ let name = Output.plain(app.name)
+ let browser = Output.plain(browserName)
+ return "\(name) is a web app of \(browser). Moving it takes away only this shortcut, and the app stays in \(browser), which can make the shortcut again. To remove the app itself, uninstall it in \(browser), which takes the shortcut away too."
+ }
+
+ /// The name of the browser a web app of `app`'s kind belongs to, as the Finder shows it.
+ static func browserName(of app: InstalledApp, among apps: [InstalledApp]) -> String? {
+ guard case .browser(let identifier) = app.webApp else { return nil }
+ return apps.first { $0.bundleIdentifier == identifier }?.name
+ ?? AppInspector.knownName(forBundleIdentifier: identifier)
+ }
+
/// What the removal does that the Trash can't bring back, said before the question.
static func warnings(moving urls: Set<URL>, of app: InstalledApp, resettingPrivacy: Bool) -> [String] {
var warnings: [String] = []
@@ -521,7 +536,8 @@ struct UninstallCommand: AsyncParsableCommand {
let warnings = Self.warnings(moving: Set(plan.moving.map(\.url)), of: target, resettingPrivacy: resetPrivacy)
let isInTheDock = !(await DockTiles().holding([target.url])).isEmpty
let dock = Self.dockNote(for: target, isInTheDock: isInTheDock, keeping: keepInDock)
- (warnings + (dock.map { [$0] } ?? [])).forEach(output.json ? Output.note : Output.line)
+ let webApp = Self.browserName(of: target, among: apps).flatMap { Self.webAppNote(for: target, browserName: $0) }
+ (warnings + [dock, webApp].compactMap(\.self)).forEach(output.json ? Output.note : Output.line)
Self.whatStays(plan, app: target, homebrew: homebrew, scan: uninstallation.scan).forEach(Output.note)
guard !dryRun else {
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift b/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
index cbd24b22..deffae60 100644
--- a/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
@@ -100,7 +100,7 @@ public enum AppInspector {
isFromAppStore: isFromAppStore,
isSystemProtected: isSystemProtected
),
- isASafariWebApp: SafariWebApp.isOne(identifier: bundleIdentifier, info: info)
+ webApp: WebApp.of(identifier: bundleIdentifier, info: info)
)
}
@@ -129,6 +129,11 @@ public enum AppInspector {
}
/// The name Finder shows for a bundle, in the user's language when the app translates its name.
+ /// The name Finder shows for the app macOS knows by `identifier`, or the identifier itself when it knows none.
+ public static func knownName(forBundleIdentifier identifier: String) -> String {
+ applicationURL(forBundleIdentifier: identifier).map(displayName(of:)) ?? identifier
+ }
+
public static func displayName(of url: URL) -> String {
let name = FileManager.default.displayName(atPath: url.path(percentEncoded: false))
return name.hasSuffix(".app") ? String(name.dropLast(4)) : name
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift b/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
index 9555d69a..e7d1163d 100644
--- a/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
@@ -33,8 +33,8 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
public let isPeelItself: Bool
/// Whether this is the very bundle the running code was started from: the copy of Peel that is running.
public let isTheRunningCopy: Bool
- /// Whether this is a web app Safari made (`SafariWebApp`), whose identifier names it and nothing of Apple's.
- public let isASafariWebApp: Bool
+ /// The browser's web app this is, or nil for any other app.
+ public let webApp: WebApp?
/// Whether `other`, a reading of the same path, is the same build. Not `==`: the date an app was last opened
/// changes every time it is opened, which is no reason to forget its size or check it for updates again.
@@ -62,7 +62,7 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
isUseRecorded: Bool = true,
dateAdded: Date? = nil,
updateFeed: UpdateFeed? = nil,
- isASafariWebApp: Bool = false
+ webApp: WebApp? = nil
) {
self.url = url
self.bundleIdentifier = bundleIdentifier
@@ -81,7 +81,7 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
self.lastUsedDate = lastUsedDate
self.isUseRecorded = isUseRecorded
self.dateAdded = dateAdded
- self.isASafariWebApp = isASafariWebApp
+ self.webApp = webApp
self.updateFeed = updateFeed
let path = PathPattern.comparablePath(of: url)
isPeelItself = Self.isPeel(bundleIdentifier, at: path)
@@ -90,6 +90,9 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
public var id: URL { url }
+ /// Whether this is a web app Safari made (`SafariWebApp`), whose identifier names it and nothing of Apple's.
+ public var isASafariWebApp: Bool { webApp == .safari }
+
public var isIntelOnly: Bool { architectures == [.x86_64] }
/// Whether the app came from Setapp. Setapp's documentation says a bundle identifier "must use the -setapp
@@ -122,7 +125,7 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
isUseRecorded: isRecorded,
dateAdded: dateAdded,
updateFeed: updateFeed,
- isASafariWebApp: isASafariWebApp
+ webApp: webApp
)
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/WebApp.swift b/Packages/PeelCore/Sources/PeelCore/Apps/WebApp.swift
new file mode 100644
index 00000000..b878aba8
--- /dev/null
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/WebApp.swift
@@ -0,0 +1,25 @@
+import Foundation
+
+/// A web app saved from a browser as an app of its own, which the browser keeps: its shortcut is the bundle, and
+/// what makes it an app stays with the browser that saved it.
+public enum WebApp: Sendable, Hashable {
+ /// One Safari made (`SafariWebApp`), whose data Safari keeps in a container named by its identifier.
+ case safari
+ /// One a Chromium browser made, such as Google Chrome. The browser keeps the app and its data in its profile, so
+ /// moving the shortcut leaves the app in the browser, which can make the shortcut again.
+ case browser(identifier: String)
+
+ /// The kind of web app `info`, an app's Info.plist, says it is, or nil for any other app.
+ static func of(identifier: String, info: [String: Any]) -> WebApp? {
+ if SafariWebApp.isOne(identifier: identifier, info: info) { return .safari }
+ // Chromium writes the browser's identifier and the app's own into the shortcut it makes, and names the
+ // shortcut by the browser's identifier followed by `.app.` (`app_mode_common.mm`,
+ // `GetBundleIdentifierForShim` in `web_app_shortcut_mac.mm`).
+ guard
+ let browser = info["CrBundleIdentifier"] as? String, !browser.isEmpty,
+ let app = info["CrAppModeShortcutID"] as? String, !app.isEmpty,
+ identifier.hasPrefix(browser + ".app.")
+ else { return nil }
+ return .browser(identifier: browser)
+ }
+}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/AppInspectorTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/AppInspectorTests.swift
index 786e5efd..4698b05e 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/AppInspectorTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/AppInspectorTests.swift
@@ -361,6 +361,30 @@ struct AppInspectorTests {
#expect(!otherTemplate.isASafariWebApp)
}
+ /// A Chromium browser writes each web app's shortcut with the browser's identifier and the app's own in its
+ /// Info.plist, under an identifier of the browser's followed by `.app.`.
+ @Test func knowsAWebAppOfAChromiumBrowserByTheShortcutItWrote() throws {
+ let directory = try TemporaryDirectory()
+ func shortcut(_ name: String, identifier: String, browser: String = "org.example.Browser") throws -> URL {
+ let info: [String: Any] = [
+ "CFBundleIdentifier": identifier, "CFBundleName": name, "CFBundleExecutable": "app_mode_loader",
+ "CrAppModeShortcutID": "abcdefghijklmnopabcdefghijklmnop", "CrBundleIdentifier": browser,
+ ]
+ let contents = try directory.directory("\(name).app/Contents")
+ try PropertyListSerialization.data(fromPropertyList: info, format: .xml, options: 0)
+ .write(to: contents.appending(path: "Info.plist"))
+ return directory.url.appending(path: "\(name).app")
+ }
+
+ let music = try #require(AppInspector.inspect(try shortcut(
+ "Music Site", identifier: "org.example.Browser.app.abcdefghijklmnopabcdefghijklmnop"
+ )))
+ #expect(music.webApp == .browser(identifier: "org.example.Browser"))
+ #expect(!music.isASafariWebApp)
+ let other = try #require(AppInspector.inspect(try shortcut("Other", identifier: "org.example.other")))
+ #expect(other.webApp == nil)
+ }
+
@Test func aWrappedBundleLinkThatLeadsOutOfTheWrapperIsNoApp() throws {
let directory = try TemporaryDirectory()
let elsewhere = try directory.directory("Elsewhere/example.app")
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift
index af322fd0..ab2ae616 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift
@@ -86,6 +86,22 @@ struct CommandLineTests {
#expect(try UninstallCommand.note(for: nil, dryRun: false) == nil)
}
+ /// Moving a browser's web app takes away only its shortcut, so the plan says where the app itself is removed.
+ @Test func saysAWebAppStaysInItsBrowser() {
+ let music = InstalledApp(
+ url: URL(filePath: "/Users/me/Applications/Chrome Apps.localized/Music.app", directoryHint: .isDirectory),
+ bundleIdentifier: "org.example.Browser.app.abcdefghijklmnop", name: "Music",
+ webApp: .browser(identifier: "org.example.Browser")
+ )
+ let note = UninstallCommand.webAppNote(for: music, browserName: "Example Browser")
+ #expect(note?.contains("uninstall it in Example Browser") == true)
+ let wiki = InstalledApp(
+ url: URL(filePath: "/Users/me/Applications/Wiki.app"), bundleIdentifier: "com.apple.Safari.WebApp.X",
+ name: "Wiki", webApp: .safari
+ )
+ #expect(UninstallCommand.webAppNote(for: wiki, browserName: "Safari") == nil)
+ }
+
@Test func parsesByteSizes() {
#expect(ByteSize(argument: "2048")?.bytes == 2_048)
#expect(ByteSize(argument: "500KB")?.bytes == 500_000)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverMatcherTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverMatcherTests.swift
index 92e9650a..d61ec197 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverMatcherTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverMatcherTests.swift
@@ -40,7 +40,7 @@ struct LeftoverMatcherTests {
url: URL(filePath: "/Users/x/Applications/Wiki.app"),
bundleIdentifier: identifier,
name: "Wiki",
- isASafariWebApp: true
+ webApp: .safari
)
#expect(match("\(identifier).plist", in: .preferences, for: wiki)?.confidence == .certain)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift
index b36691bb..cefc1064 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift
@@ -105,7 +105,7 @@ struct LeftoverScannerTests {
url: URL(filePath: "/Users/x/Applications/Wiki.app"),
bundleIdentifier: identifier,
name: "Wiki",
- isASafariWebApp: true
+ webApp: .safari
)
let scan = await LeftoverScanner(environment: environment(in: directory)).scan(wiki, installedApps: [wiki])
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift
index 2b804717..7ebd4016 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift
@@ -330,7 +330,7 @@ struct OrphanScannerTests {
)
let news = InstalledApp(
url: URL(filePath: "/Users/x/Applications/News Site.app"), bundleIdentifier: kept, name: "News Site",
- isASafariWebApp: true
+ webApp: .safari
)
let scanner = OrphanScanner(environment: SearchEnvironment(
diff --git a/Peel/Model/AppLibrary.swift b/Peel/Model/AppLibrary.swift
index 95887c7f..2acb16f4 100644
--- a/Peel/Model/AppLibrary.swift
+++ b/Peel/Model/AppLibrary.swift
@@ -851,9 +851,7 @@ final class AppLibrary {
)
}
if let name = lastNames?.names[bundleIdentifier] { return name }
- let name =
- AppInspector.applicationURL(forBundleIdentifier: bundleIdentifier).map(AppInspector.displayName(of:))
- ?? bundleIdentifier
+ let name = AppInspector.knownName(forBundleIdentifier: bundleIdentifier)
lastNames?.names[bundleIdentifier] = name
return name
}
diff --git a/Peel/Views/AppDetailView.swift b/Peel/Views/AppDetailView.swift
index f41aa300..c388dcd9 100644
--- a/Peel/Views/AppDetailView.swift
+++ b/Peel/Views/AppDetailView.swift
@@ -131,6 +131,15 @@ struct AppDetailView: View {
}
.listRowSeparator(.hidden)
}
+ if case .browser(let identifier) = plan.app.webApp {
+ let browser = library.name(forBundleIdentifier: identifier)
+ Notice(
+ title: Text("A web app of \(browser)"),
+ detail: Text("Moving it to the Trash takes away only this shortcut, and the app stays in \(browser), which can make the shortcut again. To remove the app itself, uninstall it in \(browser), which takes the shortcut away too."),
+ kind: .note
+ ) {}
+ .listRowSeparator(.hidden)
+ }
if let change = library.teamChanges[plan.app.bundleIdentifier] {
Notice(
title: change.current.isEmpty ? Text("No developer signs this app anymore") : Text("This app is signed by someone else now"),