Skip to content

Commit 888581a

Browse files
Daniel Pereiradevelar
authored andcommitted
feat: support CFBundleTypeRole for MacOS CFBundleURLTypes
Closes #736
1 parent 5031116 commit 888581a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/metadata.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,11 @@ export interface Protocol {
556556
*/
557557
readonly name: string
558558

559+
/*
560+
*macOS-only* The app’s role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Defaults to `Editor`.
561+
*/
562+
readonly role?: string
563+
559564
/*
560565
The schemes. e.g. `["irc", "ircs"]`.
561566
*/

src/packager/mac.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export async function createApp(packager: PlatformPackager<any>, appOutDir: stri
102102
}
103103
return {
104104
CFBundleURLName: protocol.name,
105+
CFBundleTypeRole: protocol.role || "Editor",
105106
CFBundleURLSchemes: schemes.slice()
106107
}
107108
})

0 commit comments

Comments
 (0)