Skip to content

Commit 1a1e962

Browse files
committed
Update Info.plist.vtl
1 parent 413a140 commit 1a1e962

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

src/main/resources/mac/Info.plist.vtl

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,50 @@
99
<array>
1010
#foreach ($fileAssociation in $info.fileAssociations)
1111
<dict>
12+
<key>CFBundleTypeIconFiles</key>
13+
<array>
14+
<string>${info.iconFile.name}</string>
15+
</array>
16+
<key>CFBundleTypeName</key>
17+
<string>${fileAssociation.description}</string>
18+
<key>CFBundleTypeRole</key>
19+
<string>Viewer</string>
20+
<key>LSHandlerRank</key>
21+
<string>Owner</string>
1222
<key>CFBundleTypeExtensions</key>
1323
<array>
1424
<string>${fileAssociation.extension}</string>
1525
</array>
16-
<key>CFBundleTypeName</key>
17-
<string>${fileAssociation.description}</string>
18-
</dict>
19-
#end
26+
<key>LSItemContentTypes</key>
27+
<array>
28+
<string>${info.macConfig.appId}.${fileAssociation.extension}</string>
29+
</array>
30+
</dict>
31+
#end
32+
</array>
33+
#end
34+
#if (!$info.fileAssociations.isEmpty())
35+
<key>UTExportedTypeDeclarations</key>
36+
<array>
37+
#foreach ($fileAssociation in $info.fileAssociations)
38+
<dict>
39+
<key>UTTypeConformsTo</key>
40+
<array>
41+
<string>public.data</string>
42+
</array>
43+
<key>UTTypeDescription</key>
44+
<string>${fileAssociation.description}</string>
45+
<key>UTTypeIdentifier</key>
46+
<string>${info.macConfig.appId}.${fileAssociation.extension}</string>
47+
<key>UTTypeTagSpecification</key>
48+
<dict>
49+
<key>public.filename-extension</key>
50+
<string>${fileAssociation.extension}</string>
51+
<key>public.mime-type</key>
52+
<string>${fileAssociation.mimeType}</string>
53+
</dict>
54+
</dict>
55+
#end
2056
</array>
2157
#end
2258
<key>CFBundleDevelopmentRegion</key>

0 commit comments

Comments
 (0)