Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions build/darwin/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ async function main(buildDir?: string): Promise<void> {
const appRoot = path.join(buildDir, `VSCode-darwin-${arch}`);
const appName = product.nameLong + '.app';
const infoPlistPath = path.resolve(appRoot, appName, 'Contents', 'Info.plist');
const embeddedInfoPlistPath = product.embedded
? path.resolve(appRoot, appName, 'Contents', 'Applications', `${product.embedded.nameShort}.app`, 'Contents', 'Info.plist')
: undefined;

const appOpts: SignOptions = {
app: path.join(appRoot, appName),
Expand Down Expand Up @@ -124,6 +127,51 @@ async function main(buildDir?: string): Promise<void> {
'An application in Visual Studio Code wants to use Audio Capture.',
`${infoPlistPath}`
]);
await spawn('plutil', [
'-insert',
'NSLocalNetworkUsageDescription',
'-string',
'The app uses your local network for DNS resolution and to connect to locally running services.',
`${infoPlistPath}`
]);
Comment thread
deepak1556 marked this conversation as resolved.

if (embeddedInfoPlistPath && fs.existsSync(embeddedInfoPlistPath)) {
await spawn('plutil', [
'-insert',
'NSAppleEventsUsageDescription',
'-string',
`An application in ${product.embedded.nameShort} wants to use AppleScript.`,
`${embeddedInfoPlistPath}`
]);
await spawn('plutil', [
'-replace',
'NSMicrophoneUsageDescription',
'-string',
`An application in ${product.embedded.nameShort} wants to use the Microphone.`,
`${embeddedInfoPlistPath}`
]);
await spawn('plutil', [
'-replace',
'NSCameraUsageDescription',
'-string',
`An application in ${product.embedded.nameShort} wants to use the Camera.`,
`${embeddedInfoPlistPath}`
]);
await spawn('plutil', [
'-replace',
'NSAudioCaptureUsageDescription',
'-string',
`An application in ${product.embedded.nameShort} wants to use Audio Capture.`,
`${embeddedInfoPlistPath}`
]);
await spawn('plutil', [
'-insert',
'NSLocalNetworkUsageDescription',
'-string',
`The app uses your local network for DNS resolution and to connect to locally running services.`,
`${embeddedInfoPlistPath}`
]);
Comment thread
deepak1556 marked this conversation as resolved.
}
}

await retrySignOnKeychainError(() => sign(appOpts));
Expand Down
Loading