feat(macos): declare document icon file for PDFs in Info.plist (#910) (#933)

This commit is contained in:
Luis Araya 2026-10-11 10:32:29 -06:00 committed by GitHub
parent 77241397d6
commit f22b5d424b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,8 @@
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeIconFile</key>
<string>PdfCraft</string>
<key>LSItemContentTypes</key>
<array><string>com.adobe.pdf</string></array>
<key>CFBundleTypeExtensions</key>

View File

@ -295,6 +295,7 @@ mod tests {
assert!(pdf.contains("<string>com.adobe.pdf</string>"), "claim PDFs by UTI, not just extension/MIME");
assert!(pdf.contains("<string>Editor</string>"), "PDF role stays Editor");
assert!(pdf.contains("<string>Alternate</string>"), "rank stays Alternate: offered without taking over Preview");
assert!(pdf.contains("<key>CFBundleTypeIconFile</key>"), "declares document icon file for Finder");
}
// The bundle id must match the app id the binary uses; renames change both (#174).